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
This commit is contained in:
nacin 2010-05-24 20:45:59 +00:00
parent bb0e7c967c
commit 7df33632b7
2 changed files with 8 additions and 13 deletions

View File

@ -51,16 +51,6 @@ if (isset($_GET['updated'])) {
<?php printf( __( 'Registration and support emails will come from this address. An address such as <code>support@%s</code> is recommended.' ), $current_site->domain ); ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e( 'Global Terms' ) ?></th>
<td>
<label><input type="radio" name="global_terms_enabled" value="0"<?php checked( global_terms_enabled(), false ) ?>/> <?php _e( 'Disabled' ); ?></label><br/>
<label><input type="radio" name="global_terms_enabled" value="1"<?php checked( global_terms_enabled(), true ) ?>/> <?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></label><br />
<?php if ( ! get_site_option( 'global_terms_enabled') ) { ?>
<strong><?php _e( 'Warning!' ); ?></strong> <?php _e( 'Enabling global terms will create a new table and synchronize terms across the network.' ); ?>
<?php } ?></td>
</tr>
</table>
<h3><?php _e( 'Dashboard Settings' ); ?></h3>
<table class="form-table">

View File

@ -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;
}