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



wp_inline_script_attributes › WordPress过滤钩子

Since5.7.0
已弃用n/a
apply_filters( 'wp_inline_script_attributes', $attributes, $data )
参数: (2)
  • (array) $attributes Key-value pairs representing `<script>` tag attributes. Only the attribute name is added to the `<script>` tag for entries with a boolean value, and that are true.
    Required: Yes
  • (string) $data Inline data.
    Required: Yes
定义在:
文档:

Filters attributes to be added to a script tag.





源码

$attributes = apply_filters( 'wp_inline_script_attributes', $attributes, $data );