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



print_emoji_detection_script › WordPress Function

Since4.2.0
已弃用n/a
› print_emoji_detection_script ( 没有参数 )
定义在:
文档:

Prints the inline Emoji detection script if it is not already printed.



源码

function print_emoji_detection_script(): void {
	static $printed = false;

	if ( $printed ) {
		return;
	}

	$printed = true;

	if ( is_admin() ) {
		if ( did_action( 'admin_print_footer_scripts' ) ) {
			_print_emoji_detection_script();
		} else {
			add_action( 'admin_print_footer_scripts', '_print_emoji_detection_script' );
		}
	} else {
		if ( did_action( 'wp_print_footer_scripts' ) ) {
			_print_emoji_detection_script();
		} else {
			add_action( 'wp_print_footer_scripts', '_print_emoji_detection_script' );
		}
	}
}