mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Fix the blog settings checkboxes on ms-sites.php. fixes #12889
git-svn-id: http://svn.automattic.com/wordpress/trunk@14102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
48a87bdaca
commit
c882ea05ac
@ -9,7 +9,7 @@
|
||||
|
||||
require_once( './admin.php' );
|
||||
|
||||
if ( !is_multisite() )
|
||||
if ( ! is_multisite() )
|
||||
wp_die( __( 'Multisite support is not enabled.' ) );
|
||||
|
||||
if ( empty( $_GET['action'] ) )
|
||||
@ -248,6 +248,9 @@ switch ( $_GET['action'] ) {
|
||||
|
||||
// update blogs table
|
||||
$blog_data = stripslashes_deep( $_POST['blog'] );
|
||||
$blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' );
|
||||
foreach ( $blog_data_checkboxes as $c )
|
||||
$blog_data[ $c ] = ! empty( $_POST['blog'][ $c ] );
|
||||
update_blog_details( $id, $blog_data );
|
||||
|
||||
// get blog prefix
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
require_once( './admin.php' );
|
||||
|
||||
if ( !is_multisite() )
|
||||
if ( ! is_multisite() )
|
||||
wp_die( __( 'Multisite support is not enabled.' ) );
|
||||
|
||||
if ( ! current_user_can( 'manage_sites' ) )
|
||||
@ -124,11 +124,9 @@ switch ( $action ) {
|
||||
<th scope="row"><?php _e( 'Site Settings' ); ?></th>
|
||||
<td>
|
||||
<?php
|
||||
if ( $is_main_site )
|
||||
$checked_fields = array( 'public' => __( 'Public' ) );
|
||||
else
|
||||
$checked_fields = array( 'public' => __( 'Public' ) );
|
||||
if ( ! $is_main_site )
|
||||
$checked_fields = array(
|
||||
'public' => __( 'Public' ),
|
||||
'archived' => __( 'Archived' ),
|
||||
'spam' => __( 'Spam' ),
|
||||
'deleted' => __( 'Deleted' ),
|
||||
@ -136,7 +134,7 @@ switch ( $action ) {
|
||||
$checked_fields['mature'] = __( 'Mature' );
|
||||
foreach ( $checked_fields as $field_key => $field_label ) {
|
||||
?>
|
||||
<input type="checkbox" name="blog[<?php echo $field_key; ?>]" id="blog_<?php echo $field_key; ?>" value="<?php echo $details->$field_key; ?>"<?php checked( $details->$field_key ); ?> />
|
||||
<input type="checkbox" name="blog[<?php echo $field_key; ?>]" id="blog_<?php echo $field_key; ?>" value="1"<?php checked( $details->$field_key ); ?> />
|
||||
<label for="blog_<?php echo $field_key; ?>"><?php echo $field_label; ?></label><br/>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user