style_loader_tag

過濾鉤子
apply_filters( 'style_loader_tag', $tag, $handle, $href, $media )
引數
  • (string) $tag The link tag for the enqueued style.
    Required:
  • (string) $handle The style's registered handle.
    Required:
  • (string) $href The stylesheet's source URL.
    Required:
  • (string) $media The stylesheet's media attribute.
    Required:
定義位置
相關勾子
style_loader_srcscript_loader_tagscript_loader_srcupload_per_pagesite_details
相關方法
wp_style_loader_srcwp_style_add_datathe_header_image_tag_wp_customize_loader_settingsallowed_tagsstrip_shortcode_tag
引入
4.5.0
棄用
-

style_loader_tag: 這是一個WordPress的過濾鉤子,允許開發者修改用於包含樣式表的HTML標籤。這可以用來給標籤新增額外的屬性或完全使用不同的標籤。

過濾一個排隊的樣式的HTML連結標籤。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$tag = apply_filters( 'style_loader_tag', $tag, $handle, $href, $media );
$tag = apply_filters( 'style_loader_tag', $tag, $handle, $href, $media );
$tag = apply_filters( 'style_loader_tag', $tag, $handle, $href, $media );

常見問題

FAQs
檢視更多 >