wp_sitemaps_users_entry filter-hookWP 5.5.0

Filters the sitemap entry for an individual user.

Usage

add_filter( 'wp_sitemaps_users_entry', 'wp_kama_sitemaps_users_entry_filter', 10, 2 );

/**
 * Function for `wp_sitemaps_users_entry` filter-hook.
 * 
 * @param array   $sitemap_entry Sitemap entry for the user.
 * @param WP_User $user          User object.
 *
 * @return array
 */
function wp_kama_sitemaps_users_entry_filter( $sitemap_entry, $user ){

	// filter...
	return $sitemap_entry;
}
$sitemap_entry(array)
Sitemap entry for the user.
$user(WP_User)
User object.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

WP_Sitemaps_Users::get_url_list()
wp_sitemaps_users_entry
wp-includes/sitemaps/providers/class-wp-sitemaps-users.php 81
$sitemap_entry = apply_filters( 'wp_sitemaps_users_entry', $sitemap_entry, $user );

Where the hook is used in WordPress

Usage not found.