widget_title
This filter is documented in wp-includes/widgets/class-wp-widget-pages.php.
Description
Parameters (1)
- 0. $title (unknown)
- The title.
Usage
- To run the hook, copy the example below.
- $title = apply_filters( 'widget_title', $title );
- if ( !empty( $title ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the widget_title callback
- function filter_widget_title( $title ) {
- // make filter magic happen here...
- return $title;
- };
- // add the filter
- add_filter( 'widget_title', 'filter_widget_title', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'widget_title', 'filter_widget_title', 10, 1 );
Defined (2)
The filter is defined in the following location(s).
- /includes/Widget.php
- $title = apply_filters( 'widget_title', $title );
- /deprecated/includes/widget.php
- $title = apply_filters( 'widget_title', $title );