`sitemap/entry` inconsistent interface definition
-
Hi, while working with your plugin I encountered a problem with the filter interface not being respected:
Defined:
– https://github.com/rankmath/seo-by-rank-math/blob/master/includes/modules/sitemap/providers/class-author.php#L171
– https://github.com/rankmath/seo-by-rank-math/blob/master/includes/modules/sitemap/providers/class-post-type.php#L221/**
* Filter URL entry before it gets added to the sitemap.
*
* @param array $url Array of URL parts.
* @param string $type URL type.
* @param object $user Data object for the URL.
*/
$url = $this->do_filter( 'sitemap/entry', $url, 'post', $post );Invalid call:
– The URL is a string instead of the array format used everywhere
– the returned value is also not clear (for an array it would always return true)
–esc_html( string $text ): string
https://github.com/rankmath/seo-by-rank-math/blob/master/includes/modules/sitemap/html-sitemap/class-posts.php#L196Can you please provide additional explanations on how the code should behave correctly?
Regards
The topic ‘`sitemap/entry` inconsistent interface definition’ is closed to new replies.