Skip to content

Docs: update hook xrefs for relocated hooks#11203

Closed
apermo wants to merge 8 commits intoWordPress:trunkfrom
apermo:fix/hook-xref-moved-hooks
Closed

Docs: update hook xrefs for relocated hooks#11203
apermo wants to merge 8 commits intoWordPress:trunkfrom
apermo:fix/hook-xref-moved-hooks

Conversation

@apermo
Copy link
Copy Markdown

@apermo apermo commented Mar 8, 2026

Summary

Fixes 17 broken "This filter/action is documented in …" cross-reference comments where the hook was moved to a different file but the cross-reference was not updated:

  • wp-admin/widgets.phpwp-admin/widgets-form.php (sidebar_admin_setup, delete_widget) — 5 xrefs
  • wp-includes/query.phpwp-includes/class-wp-query.php (comment_feed_* filters) — 5 xrefs
  • wp-includes/wp-diff.phpwp-includes/class-wp-text-diff-renderer-table.php (process_text_diff_html) — 2 xrefs
  • wp-includes/comment-template.phpwp-includes/comment.php (comment_flood_message) — 1 xref
  • wp-includes/ms-settings.phpwp-includes/ms-load.php (ms_network_not_found) — 1 xref
  • wp-includes/ms-blogs.phpwp-includes/ms-site.php (delete_blog, deleted_blog) — 2 xrefs
  • wp-includes/class-wp-image-editor-imagick.phpwp-includes/class-wp-image-editor-gd.php (image_save_progressive) — 3 xrefs (core only; 3 additional in bundled Gutenberg)
  • wp-includes/class-wp-image-editor.phpwp-includes/media.php (image_editor_output_format) — 1 xref

For detailed investigation notes, see: https://github.com/apermo/wordpress-develop/milestone/2

Trac ticket: https://core.trac.wordpress.org/ticket/64224

Use of AI Tools

Research (cross-reference audit using custom PHPStan rules and PHP scripts) 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 8 commits March 8, 2026 11:49
Update 5 cross-references for sidebar_admin_setup and
delete_widget from `wp-admin/widgets.php` to
`wp-admin/widgets-form.php` where the hooks now live.

Related to https://core.trac.wordpress.org/ticket/64224
Update 5 cross-references for comment_feed_join,
comment_feed_where, comment_feed_groupby,
comment_feed_orderby, and comment_feed_limits from
`query.php` to `class-wp-query.php`.

Related to https://core.trac.wordpress.org/ticket/64224
Update 2 cross-references for process_text_diff_html
from non-existent `wp-diff.php` to the actual file
`class-wp-text-diff-renderer-table.php`.

Related to https://core.trac.wordpress.org/ticket/64224
Update cross-reference for comment_flood_message from
`comment-template.php` to `comment.php` where the
hook's PHPDoc block now lives.

Related to https://core.trac.wordpress.org/ticket/64224
Update cross-reference for ms_network_not_found from
`ms-settings.php` to `ms-load.php` where the hook's
PHPDoc block now lives.

Related to https://core.trac.wordpress.org/ticket/64224
Update 2 cross-references for deprecated delete_blog
and deleted_blog hooks from `ms-blogs.php` to
`ms-site.php` where the hooks now live.

Related to https://core.trac.wordpress.org/ticket/64224
Update 3 cross-references for image_save_progressive
from `class-wp-image-editor-imagick.php` to
`class-wp-image-editor-gd.php` where the filter's
PHPDoc block is located.

Related to https://core.trac.wordpress.org/ticket/64224
Update cross-reference for image_editor_output_format
from `class-wp-image-editor.php` to `media.php` where
the filter's PHPDoc block now lives (inside
wp_get_image_editor_output_format).

Related to https://core.trac.wordpress.org/ticket/64224
@github-actions
Copy link
Copy Markdown

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
Copy Markdown

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.

Copy link
Copy Markdown
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

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

Minor but great finding. Thanks @apermo

@SergeyBiryukov
Copy link
Copy Markdown
Member

Thanks for the PR! Merged in r61878.

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.

3 participants