widget_custom_html_content
Filters the content of the Custom HTML widget.
Использование
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(строка)
- The widget content.
- $instance(массив)
- Array of settings for the current widget.
- $widget(WP_Widget_Custom_HTML)
- Current Custom HTML widget instance.
Список изменений
С версии 4.8.1 | Введена. |
Где вызывается хук
wp-includes/widgets/class-wp-widget-custom-html.php 164
$content = apply_filters( 'widget_custom_html_content', $content, $instance, $this );