wppaste
WordPress

apply_filters( 'wp_sitemaps_max_urls', int $max_urls, string $object_type )

Since
5.5.0
Filters the maximum number of URLs displayed on a sitemap.

Compatibility

WordPress
since 5.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$max_urlsint
The maximum number of URLs included in a sitemap. Default 2000.
$object_typestring
Object type for sitemap to be filtered (e.g. 'post', 'term', 'user').

Where this hook fires · 1

  • wp-includes/sitemaps.php:90wp_sitemaps_get_max_urls()

Source code

	 *	 * @since 5.5.0	 *	 * @param int    $max_urls    The maximum number of URLs included in a sitemap. Default 2000.	 * @param string $object_type Object type for sitemap to be filtered (e.g. 'post', 'term', 'user').	 */	return apply_filters( 'wp_sitemaps_max_urls', 2000, $object_type );} /** * Retrieves the full URL for a sitemap. * * @since 5.5.1

Changelog

Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.