Only query for global_terms_enabled once.

git-svn-id: https://develop.svn.wordpress.org/trunk@14344 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-02 22:08:05 +00:00
parent e855233121
commit b54e64fd1a

View File

@ -3763,10 +3763,13 @@ function is_main_site( $blog_id = '' ) {
* @return bool True if multisite and global terms enabled
*/
function global_terms_enabled() {
if ( is_multisite() && '1' == get_site_option( 'global_terms_enabled' ) )
return true;
if ( ! is_multisite() )
return false;
return false;
static $global_terms = null;
if ( is_null( $global_terms ) )
$global_terms = (bool) get_site_option( 'global_terms_enabled' );
return $global_terms;
}
/**