Skip to content

Conversation

@huzaifaalmesbah
Copy link
Member

Description

Enhances the documentation for the ai_feature_{$feature_id}_enabled filter to provide better understanding of the feature enable/disable system.

Changes

  • docs/DEVELOPER_GUIDE.md:
    • Added "How It Works" section explaining the internal flow
    • Added code references showing where the filter is implemented
    • Included more practical use case examples
    • Added explanation of when and why to use the filter

Why This Change?

The current documentation shows usage examples but doesn't adequately explain:

  • Where the filter is defined in the codebase
  • How the feature initialization flow works
  • Real-world scenarios where this filter would be useful

This improvement helps developers understand not just what the filter does, but how it works and when to use it.

Type of Change

  • Bug fix
  • Documentation update
  • New feature
  • Enhancement

Testing

  • Documentation is clear and accurate
  • Code references are correct
  • Examples are tested and working

Related Issues

Closes #68

- Add detailed explanation of how ai_feature_{}_enabled filter works
- Include code reference to Abstract_Feature::is_enabled() implementation
- Add more practical use case examples (user roles, environment-based)
- Explain the feature initialization flow
- Clarify when and why to use the filter

Improves developer experience by providing clearer guidance on feature customization.
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: huzaifaalmesbah <huzaifaalmesbah@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.48%. Comparing base (e76b0b2) to head (d62c235).
⚠️ Report is 8 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk      #69   +/-   ##
=========================================
  Coverage     48.48%   48.48%           
  Complexity       45       45           
=========================================
  Files             6        6           
  Lines           198      198           
=========================================
  Hits             96       96           
  Misses          102      102           
Flag Coverage Δ
unit 48.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve documentation for feature enable/disable filters

2 participants