wp_sitemaps_post_types filter-hook . WP 5.5.0
Filters the list of post object sub types available within the sitemap.
Usage
add_filter( 'wp_sitemaps_post_types', 'filter_function_name_7859' ); function filter_function_name_7859( $post_types ){ // filter... return $post_types; }
- $post_types(WP_Post_Type[])
- Array of registered post type objects keyed by their name.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
wp_sitemaps_post_types
wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php 49
return apply_filters( 'wp_sitemaps_post_types', $post_types );