widget_custom_html_content

過濾鉤子
apply_filters( 'widget_custom_html_content', $content, $instance, $this )
引數
  • (string) $content The widget content.
    Required:
  • (array) $instance Array of settings for the current widget.
    Required:
  • (WP_Widget_Custom_HTML) $widget Current Custom HTML widget instance.
    Required:
定義位置
相關勾子
widget_text_contentwidget_block_contentdelete_site_email_contentget_custom_logonew_user_email_content
相關方法
get_the_contentget_url_in_contentget_custom_logowp_get_custom_css_postget_the_content_feedget_custom_header
引入
4.8.1
棄用
-

widget_custom_html_content是 WordPress 中的過濾器鉤子,允許開發人員在自定義 HTML 小工具顯示之前修改其內容。此鉤子用於自定義 HTML 小工具的上下文中,它允許使用者將自定義 HTML 程式碼新增到他們的 WordPress 站點。

過濾自定義HTML小工具的內容。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$content = apply_filters( 'widget_custom_html_content', $content, $instance, $this );
$content = apply_filters( 'widget_custom_html_content', $content, $instance, $this );
$content = apply_filters( 'widget_custom_html_content', $content, $instance, $this );

常見問題

FAQs
檢視更多 >