script_loader_tag

过滤钩子


apply_filters( 'script_loader_tag', $tag, $handle, $src )
参数
  • (string)
    $tag
    The `<script>` tag for the enqueued script.
    Required:
  • (string)
    $handle
    The script’s registered handle.
    Required:
  • (string)
    $src
    The script’s source URL.
    Required:
定义位置
  • wp-includes/class-wp-scripts.php
    , line 406
引入
4.1.0
弃用

过滤一个排队的脚本的HTML脚本标签。

$tag = apply_filters( 'script_loader_tag', $tag, $handle, $src );