wp_dequeue_style

函式
wp_dequeue_style ( $handle )
引數
  • (string) $handle Name of the stylesheet to be removed.
    Required:
相關
  • WP_Dependencies::dequeue()
定義位置
相關方法
wp_enqueue_stylewp_enqueue_block_stylewp_dequeue_scriptwp_enqueue_stored_styleswp_enqueue_global_styles
引入
3.1.0
棄用
-

wp_dequeue_style: 這個函式用來從WordPress網站的樣式佇列中刪除一個樣式。它可以用來防止一個樣式在一個特定的頁面或文章中載入。

刪除一個先前排隊的CSS樣式表。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_dequeue_style( $handle ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
wp_styles()->dequeue( $handle );
}
function wp_dequeue_style( $handle ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); wp_styles()->dequeue( $handle ); }
function wp_dequeue_style( $handle ) {
	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );

	wp_styles()->dequeue( $handle );
}

常見問題

FAQs
檢視更多 >