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.
Source
File: wp-includes/sitemaps/class-wp-sitemaps-index.php
public function __construct( WP_Sitemaps_Registry $registry ) { $this->registry = $registry; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |