widget_text
The WordPress Core widget text hook.
Description
Parameters (2)
- 0. $array (callback) =>
array( $this, 'widget_content' )
- The array.
- 1. $int (int) =>
99
- The int.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'widget_text', $array, $int );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the widget_text callback
- function filter_widget_text( $array, $int ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'widget_text', 'filter_widget_text', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'widget_text', 'filter_widget_text', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /includes/frontend/events/class-events-php.php
- add_filter( 'widget_text', array( $this, 'widget_content' ), 99 );