wp_dequeue_style()
wp_dequeue_style( string $handle ) 删除先前排队的CSS样式表。 Remov…
wp_dequeue_style( string $handle )
删除先前排队的CSS样式表。
Remove a previously enqueued CSS stylesheet.
目录锚点:#说明#参数#源码#笔记
说明(Description)
另请参阅WP_Dependencies::dequeue()
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $handle | (string) | 要删除的样式表的名称。 |
源码(Source)
/**
* Remove a previously enqueued CSS stylesheet.
*
* @see WP_Dependencies::dequeue()
*
* @since 3.1.0
*
* @param string $handle Name of the stylesheet to be removed.
*/
function wp_dequeue_style( $handle ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
wp_styles()->dequeue( $handle );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 3.1.0 | wp-includes/functions.wp-styles.php | 1 | 12 |
笔记(Notes)
要将样式出列,必须先注册它,然后再尝试删除它。实现这一点的最佳方法是为事件设置更高的优先级,然后运行它。
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!