Only query for global_terms_enabled once.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-02 22:08:05 +00:00
parent e2f361cea4
commit a77ea8d632

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;
}
/**