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



wp_print_script_tag › WordPress Function

Since5.7.0
已弃用n/a
wp_print_script_tag ( $attributes )
参数:
  • (array) $attributes Key-value pairs representing `<script>` tag attributes.
    Required: Yes
定义在:
文档:

Prints formatted `<script>` loader tag.

It is possible to inject attributes in the <script> tag via the {@see 'wp_script_attributes'} filter. Automatically injects type attribute if needed.


源码

function wp_print_script_tag( $attributes ) {
	echo wp_get_script_tag( $attributes );
}