introduce global_terms_enabled site option, see #12589

git-svn-id: http://svn.automattic.com/wordpress/trunk@13713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-03-16 15:31:50 +00:00
parent 6d942a39d9
commit 0c2ab53136
4 changed files with 16 additions and 1 deletions

View File

@ -709,6 +709,10 @@ Thanks!
'upload_space_check_disabled' => '0',
'subdomain_install' => intval( $subdomain_install ),
);
if ( is_multisite() )
$sitemeta[ 'global_terms_enabled' ] = get_site_option( 'global_terms_enabled', '0' );
else
$sitemeta[ 'global_terms_enabled' ] = '0';
$insert = '';
foreach ( $sitemeta as $meta_key => $meta_value ) {

View File

@ -1149,6 +1149,9 @@ function upgrade_network() {
$start += 20;
}
}
// 3.0
if ( $wp_current_db_version < 13576 )
update_site_option( 'global_terms_enabled', '1' );
}
// The functions we use to actually do stuff

View File

@ -107,7 +107,7 @@ switch ( $_GET['action'] ) {
}
}
update_site_option( "dashboard_blog", $dashboard_blog_id );
$options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'mu_media_buttons', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'admin_notice_feed' );
$options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'mu_media_buttons', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'admin_notice_feed', 'global_terms_enabled' );
$checked_options = array('mu_media_buttons', 'menu_items');
foreach ( $checked_options as $option_name ) {
if ( ! isset($_POST[ $option_name ]) )

View File

@ -43,6 +43,14 @@ if (isset($_GET['updated'])) {
<?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('Global Terms') ?></th>
<td>
<label><input type='radio' id="global_terms_enabled" name="global_terms_enabled" value='1' <?php checked( get_site_option( 'global_terms_enabled' ), 1 ) ?>/> <?php _e( 'Enabled' ); ?></label><br />
<label><input type='radio' id="global_terms_enabled" name="global_terms_enabled" value='0' <?php checked( get_site_option( 'global_terms_enabled' ), 0 ) ?>/> <?php _e( 'Disabled' ); ?></label><br />
<?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></td>
</tr>
</table>
<h3><?php _e('Dashboard Settings'); ?></h3>
<table class="form-table">