Skip to content

Conversation

@huzaifaalmesbah
Copy link
Member

Description

This PR fixes inconsistent hook naming in the documentation. The documentation was showing abilities_api_init but the actual hook fired by the codebase is wp_abilities_api_init.

Fixes: #132

Changes

  • Updated docs/getting-started.md to use correct hook name
  • Updated docs/intro.md to use correct hook name

Why This Change?

All PHP code and tests use wp_abilities_api_init:

  • Fired in WP_Abilities_Registry::get_instance() (line 294)
  • Checked in wp_register_ability() (line 272)
  • Used in all test files
  • Correctly documented in docs/hooks.md and docs/php-api.md

The two files updated in this PR were the only documentation files with the incorrect hook name.

@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 <[email protected]>
Co-authored-by: gziolo <[email protected]>

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 80.39%. Comparing base (f514ac1) to head (c17c291).
⚠️ Report is 1 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk     #133   +/-   ##
=========================================
  Coverage     80.39%   80.39%           
  Complexity      178      178           
=========================================
  Files            20       20           
  Lines          1474     1474           
  Branches        120      119    -1     
=========================================
  Hits           1185     1185           
  Misses          289      289           
Flag Coverage Δ
javascript 94.31% <ø> (ø)
unit 76.31% <ø> (ø)

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.

@gziolo gziolo added this to the WP 6.9 milestone Nov 6, 2025
@gziolo gziolo added the [Type] Developer Documentation Improvements or additions to documentation label Nov 6, 2025
@gziolo gziolo enabled auto-merge (squash) November 7, 2025 14:20
@gziolo gziolo merged commit e7c6cf4 into WordPress:trunk Nov 7, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Developer Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs shows incorrect hook name for abilities API initialization

2 participants