dtpngq3378499 2019-07-28 13:25
浏览 47

如何在使用wp_dequeue_style时告诉'handle'的名称

In buddypress functions.php,

public function enqueue_styles() {
$min = bp_core_get_minified_asset_suffix();

// Locate the BP stylesheet.
    $ltr = $this->locate_asset_in_stack( "buddypress{$min}.css",     
'css' );

    // LTR.
    if ( ! is_rtl() && isset( $ltr['location'], $ltr['handle'] ) ) 
{
        wp_enqueue_style( $ltr['handle'], $ltr['location'], 
array(), $this->version, 'screen' );

        if ( $min ) {
            wp_style_add_data( $ltr['handle'], 'suffix', 
$min );
        }
    }


    // Compatibility stylesheets for specific themes.
    $theme = $this->locate_asset_in_stack( get_template() . " 
   {$min}.css", 'css' );
    if ( ! is_rtl() && isset( $theme['location'] ) ) {
        // Use a unique handle.
        $theme['handle'] = 'bp-' . get_template();
        wp_enqueue_style( $theme['handle'], 
$theme['location'], array(), $this->version, 'screen' );

        if ( $min ) {
wp_style_add_data( $theme['handle'], 'suffix', $min );
        }
}}}

I would like to use wp_dequeue_style( $ltr['handle'] ), however, how can I know this '$ltr['handle']' name? buddypress.css under theme-folder is loaded on every page, so I would like to dequeue this style sheet. I need your help. Thanks in advance!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度