template_include

过滤钩子


apply_filters( 'template_include', $template )
参数
  • (string)
    $template
    The path of the template to include.
    Required:
定义位置
  • wp-includes/template-loader.php
    , line 104
引入
3.0.0
弃用

在包含当前模板之前过滤其路径。

$template = apply_filters( 'template_include', $template );