wp_sitemaps_users_entry
Filters the sitemap entry for an individual user.
Использование
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(массив)
- Sitemap entry for the user.
- $user(WP_User)
- User object.
Список изменений
С версии 5.5.0 | Введена. |
Где вызывается хук
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 );