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.


Top ↑

Source

File: wp-includes/widgets/class-wp-widget-custom-html.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.8.1Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.