1. 首页
  2. WordPress钩子手册

exit_on_http_head

apply_filters( ‘exit_on_http_head’, bool $exit )

筛选器挂钩:筛选是否允许“HEAD”请求生成内容。
Filter Hook: Filters whether to allow ‘HEAD’ requests to generate content.

目录锚点:#说明#参数#源码


说明(Description)

通过在加载“HEAD”请求的页面内容之前退出,提供了显著的性能提升。见14348。


参数(Parameters)

参数 类型 说明
$exit (bool) 是否退出而不为“HEAD”请求生成任何内容。默认为真。

源码(Source)


更新版本 源码位置 使用 被使用
3.5.0 wp-includes/template-loader.php:26 0 0

exit_on_http_head 为WP2原创文章,链接:https://www.wp2.cn/hook/exit_on_http_head/