Yoast\WP\SEO\Schema_Aggregator\User_Interface
Schemamap_Xml_Rewrite_Integration::send_headers
Sends the response headers for the schema map.
These replace what WP::send_headers() already sent: the HTML content type, and the Expires and Cache-Control pair that wp_get_nocache_headers() for logged-in users.
Метод класса: Schemamap_Xml_Rewrite_Integration{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->send_headers();
Код Schemamap_Xml_Rewrite_Integration::send_headers() Schemamap Xml Rewrite Integration::send headers Yoast 28.7
protected function send_headers() {
\status_header( 200 );
// Prevent the search engines from indexing the schema map.
$this->redirect_helper->set_header( 'X-Robots-Tag: noindex, follow' );
$this->redirect_helper->set_header( 'Content-Type: application/xml; charset=UTF-8' );
$this->redirect_helper->set_header( 'Cache-Control: public, max-age=300' );
// The response is public, so the no-cache Expires date from wp_get_nocache_headers() must go.
$this->redirect_helper->remove_header( 'Expires' );
}