wp_sitemaps_taxonomies_pre_max_num_pages WordPress Filter Hook

The wp_sitemaps_taxonomies_pre_max_num_pages hook is used to pre-calculate the maximum number of pages that can be generated for a sitemap. This can be useful for sitemaps that are generated for large taxonomies.

apply_filters( 'wp_sitemaps_taxonomies_pre_max_num_pages', int|null $max_num_pages, string $taxonomy ) #

Filters the max number of pages for a taxonomy sitemap before it is generated.


Description

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


Top ↑

Parameters

$max_num_pages

(int|null)The maximum number of pages. Default null.

$taxonomy

(string)Taxonomy name.


Top ↑

Source

File: wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.