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 ) . '" ?>';
}
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |