WP_Sitemaps_Taxonomies::get_object_subtypes(): WP_Taxonomy[]

In this article

Returns all public, registered taxonomies.

Return

WP_Taxonomy[] Array of registered taxonomy objects keyed by their name.

Source

public function get_object_subtypes() {
	$taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );

	$taxonomies = array_filter( $taxonomies, 'is_taxonomy_viewable' );

	/**
	 * Filters the list of taxonomy object subtypes available within the sitemap.
	 *
	 * @since 5.5.0
	 *
	 * @param WP_Taxonomy[] $taxonomies Array of registered taxonomy objects keyed by their name.
	 */
	return apply_filters( 'wp_sitemaps_taxonomies', $taxonomies );
}

Hooks

apply_filters( ‘wp_sitemaps_taxonomies’, WP_Taxonomy[] $taxonomies )

Filters the list of taxonomy object subtypes available within the sitemap.

Changelog

VersionDescription
5.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.