wp_sitemaps_taxonomies
Filters the list of taxonomy object subtypes available within the sitemap.
Usage
add_filter( 'wp_sitemaps_taxonomies', 'wp_kama_sitemaps_taxonomies_filter' ); /** * Function for `wp_sitemaps_taxonomies` filter-hook. * * @param WP_Taxonomy[] $taxonomies Array of registered taxonomy objects keyed by their name. * * @return WP_Taxonomy[] */ function wp_kama_sitemaps_taxonomies_filter( $taxonomies ){ // filter... return $taxonomies; }
- $taxonomies(WP_Taxonomy[])
- Array of registered taxonomy objects keyed by their name.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
wp_sitemaps_taxonomies
wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php 47
return apply_filters( 'wp_sitemaps_taxonomies', $taxonomies );