On this page
apply_filters( 'wp_sitemaps_posts_pre_max_num_pages', int|null $max_num_pages, string $post_type )
Filters the max number of pages before it is generated.
Description
Passing a non-null value will short-circuit the generation, returning that value instead.
Parameters
$max_num_pagesint|null-
The maximum number of pages. Default null.
$post_typestring-
Post type name.
Source
File: wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php. View all references
$max_num_pages = apply_filters( 'wp_sitemaps_posts_pre_max_num_pages', null, $post_type );
Related
Used By
| Used By | Description |
|---|---|
| WP_Sitemaps_Posts::get_max_num_pages() wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php | Gets the max number of pages available for the object type. |
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_sitemaps_posts_pre_max_num_pages