wpseek.com
A WordPress-centric search engine for devs and theme authors
global_terms_enabled › WordPress Function
Since3.0.0
Deprecatedn/a
› global_terms_enabled ( No parameters )
Returns: |
|
Defined at: |
|
Codex: |
Determine whether global terms are enabled.
Related Functions: global_terms, install_global_terms, get_term_field, clean_term_cache, get_term_meta
Source
function global_terms_enabled() { if ( ! is_multisite() ) { return false; } static $global_terms = null; if ( is_null( $global_terms ) ) { /** * Filters whether global terms are enabled. * * Returning a non-null value from the filter will effectively short-circuit the function * and return 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; }