WP_Sitemaps_Renderer::__construct() WordPress Method

This method is used to create a new WP_Sitemaps_Renderer object. It accepts two parameters: $sitemaps (array) – An array of WP_Sitemaps_Map objects. $request (WP_Sitemaps_Request) – The request object.

WP_Sitemaps_Renderer::__construct() #

WP_Sitemaps_Renderer constructor.


Source

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

	public function __construct() {
		$stylesheet_url = $this->get_sitemap_stylesheet_url();

		if ( $stylesheet_url ) {
			$this->stylesheet = '<?xml-stylesheet type="text/xsl" href="' . esc_url( $stylesheet_url ) . '" ?>';
		}

		$stylesheet_index_url = $this->get_sitemap_index_stylesheet_url();

		if ( $stylesheet_index_url ) {
			$this->stylesheet_index = '<?xml-stylesheet type="text/xsl" href="' . esc_url( $stylesheet_index_url ) . '" ?>';
		}
	}


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.