global_terms_enabled

Determine whether global terms are enabled.

Description

global_terms_enabled(); 

Usage

  1. if ( !function_exists( 'global_terms_enabled' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = global_terms_enabled(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.php  
  1. function global_terms_enabled() { 
  2. if ( ! is_multisite() ) 
  3. return false; 
  4.  
  5. static $global_terms = null; 
  6. if ( is_null( $global_terms ) ) { 
  7.  
  8. /** 
  9. * Filters whether global terms are enabled. 
  10. * Passing a non-null value to the filter will effectively short-circuit the function,  
  11. * returning the value of the 'global_terms_enabled' site option instead. 
  12. * @since 3.0.0 
  13. * @param null $enabled Whether global terms are enabled. 
  14. */ 
  15. $filter = apply_filters( 'global_terms_enabled', null ); 
  16. if ( ! is_null( $filter ) ) 
  17. $global_terms = (bool) $filter; 
  18. else 
  19. $global_terms = (bool) get_site_option( 'global_terms_enabled', false ); 
  20. return $global_terms;