Skip to content

Docs: add missing hook cross-reference comments#11205

Open
apermo wants to merge 4 commits intoWordPress:trunkfrom
apermo:fix/hook-missing-xrefs
Open

Docs: add missing hook cross-reference comments#11205
apermo wants to merge 4 commits intoWordPress:trunkfrom
apermo:fix/hook-missing-xrefs

Conversation

@apermo
Copy link

@apermo apermo commented Mar 8, 2026

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 in wp-includes/deprecated.php) → canonical PHPDoc in wp-includes/post-template.php
  • link_category (×1 in wp-includes/deprecated.php) → canonical PHPDoc in wp-includes/bookmark-template.php
  • enqueue_block_assets (×1 in wp-includes/block-editor.php) → canonical PHPDoc in wp-includes/script-loader.php
  • Legacy load-*.php actions (×5 in wp-admin/admin.php) → canonical PHPDoc for load-{$pagenow} in the same file

For 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.

apermo added 4 commits March 8, 2026 15:47
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
@github-actions
Copy link

github-actions bot commented Mar 8, 2026

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.

Core Committers: Use this line as a base for the props when committing in SVN:

Props apermo.

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

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

*/
if ( 'page' === $typenow ) {
if ( 'post-new.php' === $pagenow ) {
/** This action is documented in wp-admin/admin.php */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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.

2 participants