widget_custom_html_content WordPress Filter Hook
The widget_custom_html_content hook allows you to add custom HTML content to a WordPress widget. This hook is useful if you want to add a custom image or video to a widget, or if you want to add custom CSS or JavaScript to a widget.
apply_filters( 'widget_custom_html_content', string $content , array $instance , WP_Widget_Custom_HTML $widget ) #
Filters the content of the Custom HTML widget.
Parameters
- $content
(string)The widget content.
- $instance
(array)Array of settings for the current widget.
- $widget
(WP_Widget_Custom_HTML)Current Custom HTML widget instance.
Source
Changelog
Version | Description |
---|---|
4.8.1 | Introduced. |