wp_sitemaps_index_entry хук-фильтр . WP 5.5.0
Filters the sitemap entry for the sitemap index.
Использование
add_filter( 'wp_sitemaps_index_entry', 'filter_function_name_8856', 10, 4 ); function filter_function_name_8856( $sitemap_entry, $object_type, $object_subtype, $page ){ // filter... return $sitemap_entry; }
- $sitemap_entry(массив)
- Sitemap entry for the post.
- $object_type(строка)
- Object empty name.
- $object_subtype(строка)
- Object subtype name. Empty string if the object type does not support subtypes.
- $page(число)
- Page number of results.
Список изменений
С версии 5.5.0 | Введена. |
Где вызывается хук
wp_sitemaps_index_entry
wp-includes/sitemaps/class-wp-sitemaps-provider.php 125
$sitemap_entry = apply_filters( 'wp_sitemaps_index_entry', $sitemap_entry, $this->object_type, $type['name'], $page );