wp_sitemaps_posts_show_on_front_entry
Filters the sitemap entry for the home page when the 'show_on_front' option equals 'posts'.
Использование
add_filter( 'wp_sitemaps_posts_show_on_front_entry', 'wp_kama_sitemaps_posts_show_on_front_entry_filter' ); /** * Function for `wp_sitemaps_posts_show_on_front_entry` filter-hook. * * @param array $sitemap_entry Sitemap entry for the home page. * * @return array */ function wp_kama_sitemaps_posts_show_on_front_entry_filter( $sitemap_entry ){ // filter... return $sitemap_entry; }
- $sitemap_entry(массив)
- Sitemap entry for the home page.
Список изменений
С версии 5.5.0 | Введена. |
Где вызывается хук
wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php 145
$sitemap_entry = apply_filters( 'wp_sitemaps_posts_show_on_front_entry', $sitemap_entry );