global_terms_enabled
Determine whether global terms are enabled.
Description
global_terms_enabled();
Usage
if ( !function_exists( 'global_terms_enabled' ) ) { require_once ABSPATH . WPINC . '/functions.php'; } // NOTICE! Understand what this does before running. $result = global_terms_enabled();
Defined (1)
The function is defined in the following location(s).
- /wp-includes/functions.php
- function global_terms_enabled() {
- if ( ! is_multisite() )
- return false;
- static $global_terms = null;
- if ( is_null( $global_terms ) ) {
- /**
- * Filters whether global terms are enabled.
- *
- * 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.
- *
- * @since 3.0.0
- *
- * @param null $enabled Whether global terms are enabled.
- */
- $filter = apply_filters( 'global_terms_enabled', null );
- if ( ! is_null( $filter ) )
- $global_terms = (bool) $filter;
- else
- $global_terms = (bool) get_site_option( 'global_terms_enabled', false );
- }
- return $global_terms;
- }