widget_title
Filters the widget title.
Usage
add_filter( 'widget_title', 'wp_kama_widget_title_filter', 10, 3 ); /** * Function for `widget_title` filter-hook. * * @param string $title The widget title. * @param array $instance Array of settings for the current widget. * @param mixed $id_base The widget ID. * * @return string */ function wp_kama_widget_title_filter( $title, $instance, $id_base ){ // filter... return $title; }
- $title(string)
- The widget title.
Default: 'Pages' - $instance(array)
- Array of settings for the current widget.
- $id_base(mixed)
- The widget ID.
Changelog
Since 2.6.0 | Introduced. |
Where the hook is called
widget_title
widget_title
widget_title
wp-includes/widgets/class-wp-widget-pages.php 56
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-archives.php 48
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-categories.php 52
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-search.php 47
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-media.php 240
$title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-recent-comments.php 90
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-recent-posts.php 53
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-custom-html.php 136
$title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-meta.php 50
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-rss.php 87
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-tag-cloud.php 89
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-text.php 233
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-nav-menu-widget.php 54
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
wp-includes/widgets/class-wp-widget-calendar.php 54
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
Where the hook is used in WordPress
wp-includes/default-filters.php 155
add_filter( $filter, 'wptexturize' );
wp-includes/default-filters.php 156
add_filter( $filter, 'convert_chars' );
wp-includes/default-filters.php 157
add_filter( $filter, 'esc_html' );