widget_title
This filter is documented in wp-includes/widgets/class-wp-widget-pages.php.
Description
Parameters (1)
- 0. $instance_title (unknown)
- The instance title.
Usage
- To run the hook, copy the example below.
- $instance_title = apply_filters( 'widget_title', $instance_title );
- if ( !empty( $instance_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( $instance_title ) {
- // make filter magic happen here...
- return $instance_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 (5)
The filter is defined in the following location(s).
- /classes/widgets/PodsWidgetView.php
- $title = apply_filters( 'widget_title', $instance[ 'title' ] );
- /classes/widgets/PodsWidgetSingle.php
- $title = apply_filters( 'widget_title', $instance[ 'title' ] );
- /classes/widgets/PodsWidgetList.php
- $title = apply_filters( 'widget_title', $instance[ 'title' ] );
- /classes/widgets/PodsWidgetForm.php
- $title = apply_filters( 'widget_title', $instance[ 'title' ] );
- /classes/widgets/PodsWidgetField.php
- $title = apply_filters( 'widget_title', $instance[ 'title' ] );