apply_filters( 'widget_custom_html_content', string $content, array $instance, WP_Widget_Custom_HTML $widget )
- Since
- 4.8.1
Filters the content of the Custom HTML widget.
Compatibility
- WordPress
- since 4.8.1
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$contentstring- The widget content.
$instancearray- Array of settings for the current widget.
$widgetWP_Widget_Custom_HTML- Current Custom HTML widget instance.
Where this hook fires · 1
wp-includes/widgets/class-wp-widget-custom-html.php:161WP_Widget_Custom_HTML::widget()
Source code
* @since 4.8.1 * * @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. */ $content = apply_filters( 'widget_custom_html_content', $content, $instance, $this ); // Restore post global. $post = $original_post; remove_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) ); // Inject the Text widget's container class name alongside this widget's class name for theme styling compatibility.Changelog
Introduced in 4.8.1. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.