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

返回介绍

print_late_styles()

发布于 2017-09-11 字数1692 浏览 997 评论 0

print_late_styles()

Prints the styles that were queued too late for the HTML head.


描述


返回值

(array|void)


源代码

File: wp-includes/script-loader.php

function print_late_styles() {
	global $wp_styles, $concatenate_scripts;

	if ( ! ( $wp_styles instanceof WP_Styles ) ) {
		return;
	}

	script_concat_settings();
	$wp_styles->do_concat = $concatenate_scripts;
	$wp_styles->do_footer_items();

	/**
	 * Filters whether to print the styles queued too late for the HTML head.
	 *
	 * @since 3.3.0
	 *
	 * @param bool $print Whether to print the 'late' styles. Default true.
	 */
	if ( apply_filters( 'print_late_styles', true ) ) {
		_print_styles();
	}

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

更新日志

Version 描述
3.3.0 Introduced.

相关函数

Uses

  • wp-includes/class.wp-styles.php:
    WP_Styles::do_footer_items()
  • wp-includes/class.wp-styles.php:
    WP_Styles::reset()
  • wp-includes/plugin.php:
    apply_filters()
  • wp-includes/script-loader.php:
    script_concat_settings()
  • wp-includes/script-loader.php:
    print_late_styles

Used By

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

User Contributed Notes

发布评论

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

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