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.
Usage
add_filter( 'wp_sitemaps_posts_pre_max_num_pages', 'filter_function_name_809', 10, 2 ); function filter_function_name_809( $max_num_pages, $post_type ){ // filter... return $max_num_pages; }
- $max_num_pages(int/null)
- The maximum number of pages.
Default: null - $post_type(string)
- Post type name.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
wp_sitemaps_posts_pre_max_num_pages
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 );