From 7df33632b7b55b96c57b654fe59c1766cbd8b731 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 24 May 2010 20:45:59 +0000 Subject: [PATCH] Even better, remove all UI for global terms. Add a filter to global_terms_enabled() and also allow the site option to simply be deleted. fixes #12666. git-svn-id: http://svn.automattic.com/wordpress/trunk@14854 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/ms-options.php | 10 ---------- wp-includes/functions.php | 11 ++++++++--- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/wp-admin/ms-options.php b/wp-admin/ms-options.php index 28bfce2e4..409dcc274 100644 --- a/wp-admin/ms-options.php +++ b/wp-admin/ms-options.php @@ -51,16 +51,6 @@ if (isset($_GET['updated'])) { support@%s is recommended.' ), $current_site->domain ); ?> - - - - -
-
- - - -

diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 2c1b1f27d..f9905eeb0 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3829,7 +3829,7 @@ function is_main_site( $blog_id = '' ) { } /** - * are global terms enabled + * Whether global terms are enabled. * * * @since 3.0.0 @@ -3842,8 +3842,13 @@ function global_terms_enabled() { return false; static $global_terms = null; - if ( is_null( $global_terms ) ) - $global_terms = (bool) get_site_option( 'global_terms_enabled' ); + if ( is_null( $global_terms ) ) { + $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; }