docs: fix wpseo_sitemap_entry filter parameter documentation#23403
Open
wj-yuta-imai wants to merge 1 commit into
Open
docs: fix wpseo_sitemap_entry filter parameter documentation#23403wj-yuta-imai wants to merge 1 commit into
wj-yuta-imai wants to merge 1 commit into
Conversation
The docblock for the wpseo_sitemap_entry filter described its parameters incorrectly. Since this is the canonical docblock shared by the post, user and term sitemap providers (which reference it via "This filter is documented at ..."), the parameters are documented generically: $url is the URL entry data array, $type is the object type (post, user or term), and $post is the WP_Post, WP_User or WP_Term the entry is for. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4275cb4 to
d87a741
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The docblock for the
wpseo_sitemap_entryfilter inWPSEO_Post_Type_Sitemap_Providerdescribed its parameters incorrectly, as reported in #23148. This corrects the inline documentation so developers hooking the filter get accurate parameter information.Summary
This PR can be summarized in the following changelog entry:
wpseo_sitemap_entryfilter parameters in the post type sitemap provider.Relevant technical choices:
wpseo_sitemap_entryfilter: the author and taxonomy sitemap providers reference it via/** This filter is documented at inc/sitemaps/class-post-type-sitemap-provider.php */and call the filter with different second/third arguments ('user'/WP_Userand'term'/WP_Term). The parameters are therefore documented generically so the description stays accurate for all three call sites, not only the post case.$urlis the URL entry data array (e.g.loc,mod,chf,pri),$typeis the object-type string (post,userorterm), and$postis theWP_Post/WP_User/WP_Termobject the entry is for. The existingobjecttype and alignment are kept; only the descriptions change.composer check-branch-cscould not be run locally (full monorepo dependency install was unavailable in this environment);php -lpasses and the change only edits docblock descriptions. CI will run the coding-standard check.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
inc/sitemaps/class-post-type-sitemap-provider.phpand find thewpseo_sitemap_entryfilter.$urlas the URL entry data array,$typeas the object type (post,userorterm), and$postas theWP_Post/WP_User/WP_Termobject.Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.[yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached theGoogle Docs Add-onlabel to this PR.Documentation
Quality assurance
grunt build:imagesand committed the results, if my PR introduces or edits images or SVGs.Innovation
innovationlabel.Fixes #23148