wp_sitemaps_taxonomies_entry filter-hookWP 5.5.0

Filters the sitemap entry for an individual term.

Usage

add_filter( 'wp_sitemaps_taxonomies_entry', 'wp_kama_sitemaps_taxonomies_entry_filter', 10, 3 );

/**
 * Function for `wp_sitemaps_taxonomies_entry` filter-hook.
 * 
 * @param array   $sitemap_entry Sitemap entry for the term.
 * @param WP_Term $term          Term object.
 * @param string  $taxonomy      Taxonomy name.
 *
 * @return array
 */
function wp_kama_sitemaps_taxonomies_entry_filter( $sitemap_entry, $term, $taxonomy ){

	// filter...
	return $sitemap_entry;
}
$sitemap_entry(array)
Sitemap entry for the term.
$term(WP_Term)
Term object.
$taxonomy(string)
Taxonomy name.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

WP_Sitemaps_Taxonomies::get_url_list()
wp_sitemaps_taxonomies_entry
wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php 125
$sitemap_entry = apply_filters( 'wp_sitemaps_taxonomies_entry', $sitemap_entry, $term, $taxonomy );

Where the hook is used in WordPress

Usage not found.