|
118 | 118 | <th scope="row"><?php _e('Last Updated') ?></th> |
119 | 119 | <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" size="40" /></td> |
120 | 120 | </tr> |
| 121 | + <?php |
| 122 | + if ( $is_main_site ) |
| 123 | + $checked_fields = array( 'public' => __( 'Public' ) ); |
| 124 | + else |
| 125 | + $checked_fields = array( |
| 126 | + 'public' => __('Public'), |
| 127 | + 'archived' => __('Archived'), |
| 128 | + 'spam' => __('Spam'), |
| 129 | + 'deleted' => __('Deleted'), |
| 130 | + 'mature' => __('Mature'), |
| 131 | + ); |
| 132 | + |
| 133 | + foreach ( $checked_fields as $field_key => $field_label ) { |
| 134 | + ?> |
121 | 135 | <tr class="form-field"> |
122 | | - <th scope="row"><?php _e('Public') ?></th> |
123 | | - <td> |
124 | | - <label><input type="radio" style="width:20px;" name="blog[public]" value="1" <?php checked( $details->public, 1 ); ?> /> <?php _e( 'Yes' ) ?></label> |
125 | | - <label><input type="radio" style="width:20px;" name="blog[public]" value="0" <?php checked( $details->public, 0 ); ?> /> <?php _e( 'No' ) ?></label> |
126 | | - </td> |
127 | | - </tr> |
128 | | - <?php if ( ! $is_main_site ) { ?> |
129 | | - <tr class="form-field"> |
130 | | - <th scope="row"><?php _e( 'Archived' ); ?></th> |
131 | | - <td> |
132 | | - <label><input type="radio" style="width:20px;" name="blog[archived]" value="1" <?php checked( $details->archived, 1 ); ?> /> <?php _e( 'Yes' ) ?></label> |
133 | | - <label><input type="radio" style="width:20px;" name="blog[archived]" value="0" <?php checked( $details->archived, 0 ); ?> /> <?php _e( 'No' ) ?></label> |
134 | | - </td> |
135 | | - </tr> |
136 | | - <tr class="form-field"> |
137 | | - <th scope="row"><?php _e( 'Spam' ); ?></th> |
138 | | - <td> |
139 | | - <label><input type="radio" style="width:20px;" name="blog[spam]" value="1" <?php checked( $details->spam, 1 ); ?> /> <?php _e( 'Yes' ) ?></label> |
140 | | - <label><input type="radio" style="width:20px;" name="blog[spam]" value="0" <?php checked( $details->spam, 0 ); ?> /> <?php _e( 'No' ) ?></label> |
141 | | - </td> |
142 | | - </tr> |
143 | | - <tr class="form-field"> |
144 | | - <th scope="row"><?php _e( 'Deleted' ); ?></th> |
145 | | - <td> |
146 | | - <label><input type="radio" style="width:20px;" name="blog[deleted]" value="1" <?php checked( $details->deleted, 1 ); ?> /> <?php _e( 'Yes' ) ?></label> |
147 | | - <label><input type="radio" style="width:20px;" name="blog[deleted]" value="0" <?php checked( $details->deleted, 0 ); ?> /> <?php _e( 'No' ) ?></label> |
148 | | - </td> |
149 | | - </tr> |
150 | | - <tr class="form-field"> |
151 | | - <th scope="row"><?php _e( 'Mature' ); ?></th> |
152 | | - <td> |
153 | | - <label><input type="radio" style="width:20px;" name="blog[mature]" value="1" <?php checked( $details->mature, 1 ); ?> /> <?php _e( 'Yes' ) ?></label> |
154 | | - <label><input type="radio" style="width:20px;" name="blog[mature]" value="0" <?php checked( $details->mature, 0); ?> /> <?php _e( 'No' ) ?></label> |
155 | | - </td> |
| 136 | + <th scope="row"><label for="blog_<?php echo $field_key; ?>"><?php echo $field_label; ?></label></th> |
| 137 | + <td><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 ); ?> /></td> |
156 | 138 | </tr> |
157 | 139 | <?php } ?> |
158 | 140 | </table> |
|
691 | 673 | </form> |
692 | 674 | </div> |
693 | 675 |
|
694 | | - <div class="wrap"> |
695 | | - <a name="form-add-site"></a> |
696 | | - <h2><?php _e( 'Add Site' ) ?></h2> |
| 676 | + <div id="form-add-site" class="wrap"> |
| 677 | + <h3><?php _e( 'Add Site' ) ?></h3> |
697 | 678 | <form method="post" action="ms-edit.php?action=addblog"> |
698 | 679 | <?php wp_nonce_field( 'add-blog' ) ?> |
699 | 680 | <table class="form-table"> |
|
0 commit comments