wp_kses_uri_attributes

過濾鉤子
apply_filters( 'wp_kses_uri_attributes', $uri_attributes )

wp_kses_uri_attributes:這是 WordPress 內建的一個鉤子,用於定義允許在 WordPress 中使用的 URI 屬性。通過使用這個鉤子,您可以設定允許在內容中使用的 URI 屬性,以防止惡意程式碼對網站造成安全威脅。

過濾需要包含一個URL的屬性列表。

使用這個過濾器來新增任何需要驗證為URL的 data- 屬性。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes );
$uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes );
$uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes );

常見問題

FAQs
檢視更多 >