Prerequisites
Please give us a description of what happened
See here:
|
* Filter URL entry before it gets added to the sitemap. |
|
* |
|
* @param array $url Array of URL parts. |
|
* @param string $type URL type. |
|
* @param object $post Data object for the URL. |
Those params documentation appears to be wrong,
$url is not an Array of URL parts, as it actually contains other values. The shape is, for example:
^ array:5 [▼
"loc" => "https://yoast.test/accessibility-trends/"
"mod" => "2025-10-09 08:52:15"
"chf" => "daily"
"pri" => 1
"images" => array:1 [▶]
]
-
$type is not the URL type, it's the post type.
-
$post is not a Data object for the URL, it's; the post object.
Step-by-step reproduction instructions
- Use the filter and dump the passed values.
- Observe the values differ from the documentation.
Expected results
Actual results
Screenshots, screen recording, code snippet
No response
Which editor is affected (or editors)
Which browser is affected (or browsers)
Device you are using
No response
Operating system
No response
PHP version
No response
WordPress version
6.9.4
WordPress Theme
No response
Yoast SEO version
trunk
Gutenberg plugin version (if relevant)
No response
Elementor plugin version (if relevant)
No response
Classic Editor plugin version (if relevant)
No response
Relevant plugins in case of a bug
No response
Prerequisites
Please give us a description of what happened
See here:
wordpress-seo/inc/sitemaps/class-post-type-sitemap-provider.php
Lines 218 to 222 in 6f0d97b
Those params documentation appears to be wrong,
$urlis not an Array of URL parts, as it actually contains other values. The shape is, for example:$typeis not the URL type, it's the post type.$postis not a Data object for the URL, it's; the post object.Step-by-step reproduction instructions
Expected results
Actual results
Screenshots, screen recording, code snippet
No response
Which editor is affected (or editors)
Which browser is affected (or browsers)
Device you are using
No response
Operating system
No response
PHP version
No response
WordPress version
6.9.4
WordPress Theme
No response
Yoast SEO version
trunk
Gutenberg plugin version (if relevant)
No response
Elementor plugin version (if relevant)
No response
Classic Editor plugin version (if relevant)
No response
Relevant plugins in case of a bug
No response