Filters the max number of pages before it is generated.
$max_num_pagesint|null$post_typestringwp-includes/sitemaps/providers/class-wp-sitemaps-posts.php:200WP_Sitemaps_Posts::get_max_num_pages() * * @since 5.5.0 * * @param int|null $max_num_pages The maximum number of pages. Default null. * @param string $post_type Post type name. */ $max_num_pages = apply_filters( 'wp_sitemaps_posts_pre_max_num_pages', null, $post_type ); if ( null !== $max_num_pages ) { return $max_num_pages; } $args = $this->get_posts_query_args( $post_type );Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.