WP_Sitemaps_Taxonomies::get_object_subtypes() WordPress Method

The WP_Sitemaps_Taxonomies::get_object_subtypes() method retrieves all the registered taxonomy object types for a given taxonomy.

WP_Sitemaps_Taxonomies::get_object_subtypes() #

Returns all public, registered taxonomies.


Return

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


Top ↑

Source

File: wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php

	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 );
	}


Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.