wp_sitemaps_users_entry
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_entry
wp-includes/sitemaps/providers/class-wp-sitemaps-users.php 81
$sitemap_entry = apply_filters( 'wp_sitemaps_users_entry', $sitemap_entry, $user );