WP_Sitemaps_Index::__construct() WordPress Method

The WP_Sitemaps_Index::__construct() method is used to create a new WP_Sitemaps_Index object. The constructor takes two arguments: The first argument is an array of WP_Sitemaps_Provider objects. This is an optional argument, and if not provided, the instance will use the default list of providers. The second argument is an array of options. The only option currently recognized is 'max_entries', which sets the maximum number of entries that will be generated by the index.

WP_Sitemaps_Index::__construct( WP_Sitemaps_Registry $registry ) #

WP_Sitemaps_Index constructor.


Parameters

$registry

(WP_Sitemaps_Registry)(Required)Sitemap provider registry.


Top ↑

Source

File: wp-includes/sitemaps/class-wp-sitemaps-index.php

	public function __construct( WP_Sitemaps_Registry $registry ) {
		$this->registry = $registry;
	}


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.