WPSEO_Sitemaps::css_output │ public │ Yoast 1.0

Spits out the CSS for the XML sitemap.

Метод класса: WPSEO_Sitemaps{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$WPSEO_Sitemaps = new WPSEO_Sitemaps();
$WPSEO_Sitemaps->css_output();

Код WPSEO_Sitemaps::css_output() Yoast 28.9

public function css_output() {
	if ( ! headers_sent() ) {
		header( $this->http_protocol . ' 200 OK', true, 200 );
		// Prevent the search engines from indexing the XML Sitemap.
		header( 'X-Robots-Tag: noindex, follow', true );
		header( 'Content-Type: text/css; charset=UTF-8' );

		// Make the browser cache this file properly.
		$expires = MONTH_IN_SECONDS;
		header( 'Pragma: public' );
		header( 'Cache-Control: max-age=' . $expires );
		header( 'Expires: ' . YoastSEO()->helpers->date->format_timestamp( ( time() + $expires ), 'D, d M Y H:i:s' ) . ' GMT' );
	}

	// Don't use WP_Filesystem() here because that's not initialized yet. See https://yoast.atlassian.net/browse/QAK-2043.
	readfile( WPSEO_PATH . 'css/main-sitemap.css' );
}