wp_sitemaps_posts_pre_url_list хук-фильтр . WP 5.5.0
Filters the posts URL list before it is generated.
Passing a non-null value will effectively short-circuit the generation, returning that value instead.
Использование
add_filter( 'wp_sitemaps_posts_pre_url_list', 'filter_function_name_13', 10, 3 ); function filter_function_name_13( $url_list, $post_type, $page_num ){ // filter... return $url_list; }
- $url_list(массив)
- The URL list.
По умолчанию: null - $post_type(строка)
- Post type name.
- $page_num(число)
- Page of results.
Список изменений
С версии 5.5.0 | Введена. |
Где вызывается хук
wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php 81-86
$url_list = apply_filters( 'wp_sitemaps_posts_pre_url_list', null, $post_type, $page_num );