wp_style_is()判断一个样式表是否已经注册/加载/输出

目录

描述

Determine if a style has been registered, queued, printed, or is waiting to be printed.

wp_style_is() 描述

用法

<?php wp_style_is$handle$list 'enqueued' ); ?>

wp_style_is() 用法

参数

$handle

(string) (必填) Name of the style. Lowercase string.

默认值: None

$list

(string) (可选) The list to query.

  • registered - style was registered through wp_register_style()
  • enqueued / queue - style was enqueued
  • done - style has been printed
  • to_do - style has not yet been printed

默认值: enqueued

wp_style_is() 参数

返回值

(bool) 

True or false.

wp_style_is() 返回值

历史

添加于 版本: 2.8

wp_style_is() 历史

源文件

wp_style_is() 函数的代码位于 wp-includes/functions.wp-styles.php.

wp_style_is() 源文件

相关