wp_sitemaps_posts_pre_max_num_pages WordPress Filter Hook
The wp_sitemaps_posts_pre_max_num_pages hook is used to pre-fetch the maximum number of pages for a sitemap. This is useful for sitemaps that are very large or have a lot of content.
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_pages
(int|null)The maximum number of pages. Default null.
- $post_type
(string)Post type name.
Source
File: wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |