wpseek.com
WordPress开发者和主题制作者的搜索引擎



exit_on_http_head › WordPress过滤钩子

Since3.5.0
已弃用n/a
apply_filters( 'exit_on_http_head', true )
参数:
  • (bool) $exit Whether to exit without generating any content for 'HEAD' requests. Default true.
    Required: Yes
定义在:
文档:

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.





源码

if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) {