Docs: fix path typos in hook cross-references#11202
Docs: fix path typos in hook cross-references#11202apermo wants to merge 5 commits intoWordPress:trunkfrom
Conversation
Fix 3 cross-references in widgets.php pointing to non-existent `wp-includes/widget.php` — the correct filename is `wp-includes/widgets.php` (plural). Related to https://core.trac.wordpress.org/ticket/64224
Fix enqueue_block_editor_assets cross-reference in class-wp-customize-widgets.php — add missing `wp-admin/` path prefix to `edit-form-blocks.php`. Related to https://core.trac.wordpress.org/ticket/64224
Fix cross-reference path from `wp-admin/post.php` to `wp-admin/includes/post.php` and correct the hook type from "filter" to "action" (it uses do_action). Related to https://core.trac.wordpress.org/ticket/64224
Fix pre_unzip_file and unzip_file cross-references in file.php — remove spurious `src/` prefix and correct the unzip_file hook type from "action" to "filter" (it uses apply_filters). Related to https://core.trac.wordpress.org/ticket/64224
Fix cross-reference path from `wp-admin/includes/media.php` to `wp-includes/media.php` where the filter's PHPDoc block is located. 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. |
| } | ||
|
|
||
| /** This filter is documented in wp-admin/includes/media.php */ | ||
| /** This filter is documented in wp-includes/media.php */ |
There was a problem hiding this comment.
We are not updating the src/wp-includes/deprecated.php file. cc. @SergeyBiryukov
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Looks good. Left a non-blocking comment
Summary
Fixes 8 broken "This filter/action is documented in …" cross-reference comments where the referenced file path contains a typo or incorrect prefix:
wp-includes/widget.php→wp-includes/widgets.php(missing 's') — 3 xrefsedit-form-blocks.php→wp-admin/edit-form-blocks.php(missing prefix) — 1 xrefwp-admin/post.php→wp-admin/includes/post.php(missingincludes/) — 1 xrefsrc/wp-admin/includes/file.php→wp-admin/includes/file.php(spurioussrc/) — 2 xrefswp-admin/includes/media.php→wp-includes/media.php(wrong path) — 1 xrefAlso corrects two hook type labels (
filter→actionforwp_creating_autosave,action→filterforunzip_file).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.