WordPress at a glance
filter is not described

wp_sitemaps_posts_pre_max_num_pages filter-hook . WP 5.5.0

Filters the max number of pages before it is generated.

Passing a non-null value will short-circuit the generation, returning that value instead.


add_filter( 'wp_sitemaps_posts_pre_max_num_pages', 'filter_function_name_177', 10, 2 );
function filter_function_name_177( $max_num_pages, $post_type ){
	// filter...

	return $max_num_pages;
The maximum number of pages.
Default: null
Post type name.

Список изменений

С версии 5.5.0 Введена.

Где вызывается хук

wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php 165
$max_num_pages = apply_filters( 'wp_sitemaps_posts_pre_max_num_pages', null, $post_type );

Где используется хук в ядре WP

Использование не найдено.