print_footer_scripts() - WordPress 函数参考中文文档

返回介绍

print_footer_scripts()

发布于 2017-09-11 字数1751 浏览 851 评论 0

print_footer_scripts()

Prints the scripts that were queued for the footer or too late for the HTML head.


描述


返回值

(array)


源代码

File: wp-includes/script-loader.php

function print_footer_scripts() {
	global $wp_scripts, $concatenate_scripts;

	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
		return array(); // No need to run if not instantiated.
	}
	script_concat_settings();
	$wp_scripts->do_concat = $concatenate_scripts;
	$wp_scripts->do_footer_items();

	/**
	 * Filters whether to print the footer scripts.
	 *
	 * @since 2.8.0
	 *
	 * @param bool $print Whether to print the footer scripts. Default true.
	 */
	if ( apply_filters( 'print_footer_scripts', true ) ) {
		_print_scripts();
	}

	$wp_scripts->reset();
	return $wp_scripts->done;
}

更新日志

Version 描述
2.8.0 Introduced.

相关函数

Uses

  • wp-includes/plugin.php:
    apply_filters()
  • wp-includes/class.wp-scripts.php:
    WP_Scripts::do_footer_items()
  • wp-includes/class.wp-scripts.php:
    WP_Scripts::reset()
  • wp-includes/script-loader.php:
    script_concat_settings()
  • wp-includes/script-loader.php:
    print_footer_scripts

Used By

  • wp-includes/script-loader.php:
    _wp_footer_scripts()

User Contributed Notes

上一篇:print_emoji_styles()

下一篇:print_head_scripts()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!