WP_Sitemaps_Stylesheet::render_stylesheet()
Renders the XSL stylesheet depending on whether it's the sitemap index or not.
Метод класса: WP_Sitemaps_Stylesheet{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WP_Sitemaps_Stylesheet = new WP_Sitemaps_Stylesheet(); $WP_Sitemaps_Stylesheet->render_stylesheet( $type );
- $type(строка) (обязательный)
- Stylesheet type. Either 'sitemap' or 'index'.
Код WP_Sitemaps_Stylesheet::render_stylesheet() WP Sitemaps Stylesheet::render stylesheet WP 6.7.1
public function render_stylesheet( $type ) { header( 'Content-Type: application/xml; charset=UTF-8' ); if ( 'sitemap' === $type ) { // All content is escaped below. echo $this->get_sitemap_stylesheet(); } if ( 'index' === $type ) { // All content is escaped below. echo $this->get_sitemap_index_stylesheet(); } exit; }