WordPress.org

Make WordPress Core

Changeset 14344


Ignore:
Timestamp:
05/02/2010 10:08:05 PM (8 years ago)
Author:
nacin
Message:

Only query for global_terms_enabled once.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r14330 r14344  
    37643764 */
    37653765function global_terms_enabled() {
    3766     if ( is_multisite() && '1' == get_site_option( 'global_terms_enabled' ) )
    3767         return true;
    3768 
    3769     return false;
     3766    if ( ! is_multisite() )
     3767        return false;
     3768
     3769    static $global_terms = null;
     3770    if ( is_null( $global_terms ) )
     3771        $global_terms = (bool) get_site_option( 'global_terms_enabled' );
     3772    return $global_terms;
    37703773}
    37713774
Note: See TracChangeset for help on using the changeset viewer.