Make WordPress Core

Changeset 14277


Ignore:
Timestamp:
04/28/2010 08:15:45 AM (16 years ago)
Author:
nacin
Message:

Restore radios for MS site flags, as the schema supports other values. see #12832

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-edit.php

    r14253 r14277  
    249249                // update blogs table
    250250                $blog_data = stripslashes_deep( $_POST['blog'] );
    251                 $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' );
    252                 foreach ( $blog_data_checkboxes as $c )
    253                         $blog_data[ $c ] = ! empty( $_POST['blog'][ $c ] );
    254251                update_blog_details( $id, $blog_data );
    255252
  • trunk/wp-admin/ms-sites.php

    r14188 r14277  
    121121                                                        <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" size="40" /></td>
    122122                                                </tr>
     123                                                <?php
     124                                                $radio_fields = array( 'public' => __( 'Public' ) );
     125                                                if ( ! $is_main_site ) {
     126                                                        $radio_fields['archived'] = __( 'Archived' );
     127                                                        $radio_fields['spam']     = __( 'Spam' );
     128                                                        $radio_fields['deleted']  = __( 'Deleted' );
     129                                                }
     130                                                $radio_fields['mature'] = __( 'Mature' );
     131                                                foreach ( $radio_fields as $field_key => $field_label ) {
     132                                                ?>
    123133                                                <tr>
    124                                                         <th scope="row"><?php _e( 'Site Settings' ); ?></th>
     134                                                        <th scope="row"><?php echo $field_label; ?></th>
    125135                                                        <td>
    126                                                 <?php
    127                                                 $checked_fields = array( 'public' => __( 'Public' ) );
    128                                                 if ( ! $is_main_site ) {
    129                                                         $checked_fields['archived'] = __( 'Archived' );
    130                                                         $checked_fields['spam']     = __( 'Spam' );
    131                                                         $checked_fields['deleted']  = __( 'Deleted' );
    132                                                 }
    133                                                 $checked_fields['mature'] = __( 'Mature' );
    134                                                 foreach ( $checked_fields as $field_key => $field_label ) {
    135                                                 ?>
    136                                                                 <input type="checkbox" name="blog[<?php echo $field_key; ?>]" id="blog_<?php echo $field_key; ?>" value="1"<?php checked( $details->$field_key ); ?> />
    137                                                                 <label for="blog_<?php echo $field_key; ?>"><?php echo $field_label; ?></label><br/>
    138                                                 <?php } ?>
     136                                                                <input type="radio" name="blog[<?php echo $field_key; ?>]" id="blog_<?php $field_key; ?>_1" value="1"<?php checked( $details->$field_key, 1 ); ?> />
     137                                                                <label for="blog_<?php echo $field_key; ?>_1"><?php _e('Yes'); ?></label>
     138                                                                <input type="radio" name="blog[<?php echo $field_key; ?>]" id="blog_<?php $field_key; ?>_0" value="0"<?php checked( $details->$field_key, 0 ); ?> />
     139                                                                <label for="blog_<?php echo $field_key; ?>"><?php _e('No'); ?></label>
    139140                                                        </td>
    140141                                                </tr>
     142                                                <?php } ?>
    141143                                        </table>
    142144                                        <p class="submit" style="text-align:center;"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Update Options' ) ?>" /></p>
Note: See TracChangeset for help on using the changeset viewer.