apply_filters( 'wp_sitemaps_posts_entry', array $sitemap_entry, WP_Post $post, string $post_type )
- Since
- 5.5.0
Filters the sitemap entry for an individual post.
Compatibility
- WordPress
- since 5.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$sitemap_entryarray- Sitemap entry for the post.
$postWP_Post- Post object.
$post_typestring- Name of the post_type.
Where this hook fires · 1
wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php:164WP_Sitemaps_Posts::get_url_list()
Source code
* @since 5.5.0 * * @param array $sitemap_entry Sitemap entry for the post. * @param WP_Post $post Post object. * @param string $post_type Name of the post_type. */ $sitemap_entry = apply_filters( 'wp_sitemaps_posts_entry', $sitemap_entry, $post, $post_type ); $url_list[] = $sitemap_entry; } return $url_list; }Changelog
Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.