widget_custom_html_content filter-hookWP 4.8.1

Filters the content of the Custom HTML widget.

Usage

add_filter( 'widget_custom_html_content', 'wp_kama_widget_custom_html_content_filter', 10, 3 );

/**
 * Function for `widget_custom_html_content` filter-hook.
 * 
 * @param string                $content  The widget content.
 * @param array                 $instance Array of settings for the current widget.
 * @param WP_Widget_Custom_HTML $widget   Current Custom HTML widget instance.
 *
 * @return string
 */
function wp_kama_widget_custom_html_content_filter( $content, $instance, $widget ){

	// filter...
	return $content;
}
$content(string)
The widget content.
$instance(array)
Array of settings for the current widget.
$widget(WP_Widget_Custom_HTML)
Current Custom HTML widget instance.

Changelog

Since 4.8.1 Introduced.

Where the hook is called

WP_Widget_Custom_HTML::widget()
widget_custom_html_content
wp-includes/widgets/class-wp-widget-custom-html.php 164
$content = apply_filters( 'widget_custom_html_content', $content, $instance, $this );

Where the hook is used in WordPress

Usage not found.