global_terms_enabled
Filters whether global terms are enabled.
Description
Passing a non-null value to the filter will effectively short-circuit the function, returning the value of the global_terms_enabled site option instead.
Parameters (1)
- 0. $null (null) =>
null
- Whether global terms are enabled.
Usage
- To run the hook, copy the example below.
- $null = apply_filters( 'global_terms_enabled', $null );
- if ( !empty( $null ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the global_terms_enabled callback
- function filter_global_terms_enabled( $null ) {
- // make filter magic happen here...
- return $null;
- };
- // add the filter
- add_filter( 'global_terms_enabled', 'filter_global_terms_enabled', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'global_terms_enabled', 'filter_global_terms_enabled', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/functions.php
- $filter = apply_filters( 'global_terms_enabled', null );