wp_sitemaps_max_urls filter-hookWP 5.5.0

Filters the maximum number of URLs displayed on a sitemap.

Usage

add_filter( 'wp_sitemaps_max_urls', 'wp_kama_wp_sitemaps_max_urls_filter', 10, 2 );
function wp_kama_wp_sitemaps_max_urls_filter( $max_urls, $object_type ){
	// filter...

	return $max_urls;
}
$max_urls(int)
The maximum number of URLs included in a sitemap.
Default: 2000
$object_type(string)
Object type for sitemap to be filtered (e.g. 'post', 'term', 'user').

Changelog

Since 5.5.0 Introduced.

Where the hook is called

wp_sitemaps_get_max_urls()
wp_sitemaps_max_urls
wp-includes/sitemaps.php 90
return apply_filters( 'wp_sitemaps_max_urls', 2000, $object_type );

Where the hook is used in WordPress

Usage not found.