exit_on_http_head хук-фильтр . WP 3.5.0
Filters whether to allow 'HEAD' requests to generate content.
Provides a significant performance bump by exiting before the page content loads for 'HEAD' requests. See #14348.
Использование
add_filter( 'exit_on_http_head', 'filter_function_name_5906' ); function filter_function_name_5906( $exit ){ // filter... return $exit; }
- $exit(true/false)
- Whether to exit without generating any content for 'HEAD' requests.
По умолчанию: true
Список изменений
С версии 3.5.0 | Введена. |
Где вызывается хук
В файле: /wp-includes/template-loader.php
wp-includes/template-loader.php 26
if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) {