Docs: add missing hook cross-reference comments#11205
Docs: add missing hook cross-reference comments#11205apermo wants to merge 4 commits intoWordPress:trunkfrom
Conversation
Add 4 missing cross-reference comments for the_title filter in deprecated functions previous_post(), next_post(), start_post_rel_link(), and parent_post_rel_link(). Canonical PHPDoc is in wp-includes/post-template.php. Related to https://core.trac.wordpress.org/ticket/64224
Add missing cross-reference comment for link_category filter in deprecated get_links_list(). Canonical PHPDoc is in wp-includes/bookmark-template.php. Related to https://core.trac.wordpress.org/ticket/64224
Add missing cross-reference comment for enqueue_block_assets action in block-editor.php. Canonical PHPDoc is in wp-includes/script-loader.php. Related to https://core.trac.wordpress.org/ticket/64224
Add 5 missing cross-reference comments for legacy
back-compat page-load hooks in admin.php pointing to
the primary load-{pagenow} PHPDoc in the same file.
Related to https://core.trac.wordpress.org/ticket/64224
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| */ | ||
| if ( 'page' === $typenow ) { | ||
| if ( 'post-new.php' === $pagenow ) { | ||
| /** This action is documented in wp-admin/admin.php */ |
There was a problem hiding this comment.
Per https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#4-1-duplicate-hooks we only use this doc type when have duplicate hooks. Do we have any other reference where it define?
Summary
Adds 11 missing "This filter/action is documented in …" cross-reference comments for hook calls that have a canonical PHPDoc block elsewhere but were missing the xref:
the_title(×4 inwp-includes/deprecated.php) → canonical PHPDoc inwp-includes/post-template.phplink_category(×1 inwp-includes/deprecated.php) → canonical PHPDoc inwp-includes/bookmark-template.phpenqueue_block_assets(×1 inwp-includes/block-editor.php) → canonical PHPDoc inwp-includes/script-loader.phpload-*.phpactions (×5 inwp-admin/admin.php) → canonical PHPDoc forload-{$pagenow}in the same fileFor detailed investigation notes, see: https://github.com/apermo/wordpress-develop/milestone/5
Trac ticket: https://core.trac.wordpress.org/ticket/64224
Use of AI Tools
Research (cross-reference audit across all hook call sites in core) and code were produced by Claude Code (claude-sonnet-4-6). The contributor reviewed the findings, verified each fix, and approved the final implementation.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.