wp_sitemaps_taxonomies filter-hookWP 5.5.0

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::get_object_subtypes()
wp_sitemaps_taxonomies
wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php 47
return apply_filters( 'wp_sitemaps_taxonomies', $taxonomies );

Where the hook is used in WordPress

Usage not found.