Changeset 13796
- Timestamp:
- 03/22/2010 06:02:04 AM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/ms-edit.php
r13733 r13796 109 109 update_site_option( "dashboard_blog", $dashboard_blog_id ); 110 110 // global terms 111 if ( !global_terms_enabled() && '1' == $_POST[ 'global_terms_enabled' ]) {111 if ( !global_terms_enabled() && ! empty( $_POST[ 'global_terms_enabled' ] ) ) { 112 112 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 113 113 // create global terms table … … 115 115 } 116 116 $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' ); 117 $checked_options = array('mu_media_buttons' , 'menu_items');118 foreach ( $checked_options as $option_name ) {117 $checked_options = array('mu_media_buttons' => array(), 'menu_items' => array(), 'registrationnotification' => 'no', 'upload_space_check_disabled' => 1 ); 118 foreach ( $checked_options as $option_name => $option_unchecked_value ) { 119 119 if ( ! isset($_POST[ $option_name ]) ) 120 $_POST[ $option_name ] = array();120 $_POST[ $option_name ] = $option_unchecked_value; 121 121 } 122 122 foreach ( $options as $option_name ) { -
trunk/wp-admin/ms-options.php
r13795 r13796 28 28 <table class="form-table"> 29 29 <tr valign="top"> 30 <th scope="row">< ?php _e('Network Name') ?></th>30 <th scope="row"><label for="site_name"><?php _e('Network Name') ?></label></th> 31 31 <td> 32 32 <input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr($current_site->site_name) ?>" /> … … 37 37 38 38 <tr valign="top"> 39 <th scope="row">< ?php _e('Network Admin Email') ?></th>39 <th scope="row"><label for="admin_email"><?php _e('Network Admin Email') ?></label></th> 40 40 <td> 41 41 <input name="admin_email" type="text" id="admin_email" class="regular-text" value="<?php echo esc_attr( get_site_option('admin_email') ) ?>" /> 42 42 <br /> 43 <?php printf( __( 'Registration and support emails will come from this address. An address such as "support@%s"is recommended.' ), $current_site->domain ); ?>43 <?php printf( __( 'Registration and support emails will come from this address. An address such as <code>support@%s</code> is recommended.' ), $current_site->domain ); ?> 44 44 </td> 45 45 </tr> … … 48 48 <th scope="row"><?php _e('Global Terms') ?></th> 49 49 <td> 50 <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 /> 51 <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 /> 52 <?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></td> 50 <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( 'Maintain a global list of terms from all sites across the network.' ); ?></label><br /> 51 <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></td> 53 52 </tr> 54 53 </table> … … 56 55 <table class="form-table"> 57 56 <tr valign="top"> 58 <th scope="row">< ?php _e('Dashboard Site') ?></th>57 <th scope="row"><label for="dashboard_blog"><?php _e('Dashboard Site') ?></label></th> 59 58 <td> 60 59 <?php … … 72 71 </tr> 73 72 <tr valign="top"> 74 <th scope="row">< ?php _e('Dashboard User Default Role') ?></th>75 <td> 76 <select name="default_user_role" id=" role"><?php73 <th scope="row"><label for="default_user_role"><?php _e('Dashboard User Default Role') ?></label></th> 74 <td> 75 <select name="default_user_role" id="default_user_role"><?php 77 76 wp_dropdown_roles( get_site_option( 'default_user_role', 'subscriber' ) ); 78 77 ?> … … 83 82 </tr> 84 83 <tr valign="top"> 85 <th scope="row">< ?php _e('Admin Notice Feed') ?></th>84 <th scope="row"><label for="admin_notice_feed"><?php _e('Admin Notice Feed') ?></label></th> 86 85 <td><input name="admin_notice_feed" class="large-text" type="text" id="admin_notice_feed" value="<?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?>" size="80" /><br /> 87 86 <?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?><br /> … … 117 116 ?> 118 117 <td> 119 <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes'<?php checked( get_site_option('registrationnotification'), 'yes') ?> /> <?php _e('Yes'); ?><br /> 120 <input name="registrationnotification" type="radio" id="registrationnotification2" value='no'<?php checked( get_site_option('registrationnotification'), 'no') ?> /> <?php _e('No'); ?><br /> 121 <?php _e('Send the network admin an email notification every time someone registers a site or user account.') ?> 122 </td> 123 </tr> 124 125 <tr valign="top"> 118 <label><input name="registrationnotification" type="checkbox" id="registrationnotification" value='yes'<?php checked( get_site_option('registrationnotification'), 'yes' ) ?> /> <?php _e('Send the network admin an email notification every time someone registers a site or user account.') ?></label> 119 </td> 120 </tr> 121 122 <tr valign="top" id="addnewusers"> 126 123 <th scope="row"><?php _e('Add New Users') ?></th> 127 124 <td> 128 <a name='addnewusers'></a> 129 <input name="add_new_users" type="radio" id="add_new_users1" value='1'<?php checked( get_site_option('add_new_users'), 1 ) ?> /> <?php _e('Yes'); ?><br /> 130 <input name="add_new_users" type="radio" id="add_new_users2" value='0'<?php checked( get_site_option('add_new_users'), 0 ) ?> /> <?php _e('No'); ?><br /> 131 <?php _e('Allow site administrators to add new users to their site via the "Users->Add New" page.') ?> 132 </td> 133 </tr> 134 135 <tr valign="top"> 136 <th scope="row"><?php _e('Banned Names') ?></th> 125 <label><input name="add_new_users" type="checkbox" id="add_new_users" value='1'<?php checked( get_site_option('add_new_users') ) ?> /> <?php _e('Allow site administrators to add new users to their site via the "Users->Add New" page.'); ?></label> 126 </td> 127 </tr> 128 129 <tr valign="top"> 130 <th scope="row"><label for="illegal_names"><?php _e('Banned Names') ?></label></th> 137 131 <td> 138 132 <input name="illegal_names" type="text" id="illegal_names" class="large-text" value="<?php echo esc_attr( implode( " ", get_site_option('illegal_names') ) ); ?>" size="45" /> … … 143 137 144 138 <tr valign="top"> 145 <th scope="row">< ?php _e('Limited Email Registrations') ?></th>139 <th scope="row"><label for="limited_email_domains"><?php _e('Limited Email Registrations') ?></label></th> 146 140 <td> 147 141 <?php $limited_email_domains = get_site_option('limited_email_domains'); … … 154 148 155 149 <tr valign="top"> 156 <th scope="row">< ?php _e('Banned Email Domains') ?></th>150 <th scope="row"><label for="banned_email_domains"><?php _e('Banned Email Domains') ?></label></th> 157 151 <td> 158 152 <textarea name="banned_email_domains" id="banned_email_domains" cols='45' rows='5'><?php echo wp_htmledit_pre( get_site_option('banned_email_domains') == '' ? '' : implode( "\n", (array) get_site_option('banned_email_domains') ) ); ?></textarea> … … 167 161 168 162 <tr valign="top"> 169 <th scope="row">< ?php _e('Welcome Email') ?></th>163 <th scope="row"><label for="welcome_email"><?php _e('Welcome Email') ?></label></th> 170 164 <td> 171 165 <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea> … … 175 169 </tr> 176 170 <tr valign="top"> 177 <th scope="row">< ?php _e('Welcome User Email') ?></th>171 <th scope="row"><label for="welcome_user_email"><?php _e('Welcome User Email') ?></label></th> 178 172 <td> 179 173 <textarea name="welcome_user_email" id="welcome_user_email" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('welcome_user_email') ) ?></textarea> … … 183 177 </tr> 184 178 <tr valign="top"> 185 <th scope="row">< ?php _e('First Post') ?></th>179 <th scope="row"><label for="first_post"><?php _e('First Post') ?></label></th> 186 180 <td> 187 181 <textarea name="first_post" id="first_post" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea> … … 191 185 </tr> 192 186 <tr valign="top"> 193 <th scope="row">< ?php _e('First Page') ?></th>187 <th scope="row"><label for="first_page"><?php _e('First Page') ?></label></th> 194 188 <td> 195 189 <textarea name="first_page" id="first_page" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('first_page') ) ?></textarea> … … 199 193 </tr> 200 194 <tr valign="top"> 201 <th scope="row">< ?php _e('First Comment') ?></th>195 <th scope="row"><label for="first_comment"><?php _e('First Comment') ?></label></th> 202 196 <td> 203 197 <textarea name="first_comment" id="first_comment" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('first_comment') ) ?></textarea> … … 207 201 </tr> 208 202 <tr valign="top"> 209 <th scope="row">< ?php _e('First Comment Author') ?></th>203 <th scope="row"><label for="first_comment_author"><?php _e('First Comment Author') ?></label></th> 210 204 <td> 211 205 <input type="text" size='40' name="first_comment_author" id="first_comment_author" value="<?php echo get_site_option('first_comment_author') ?>" /> … … 215 209 </tr> 216 210 <tr valign="top"> 217 <th scope="row">< ?php _e('First Comment URL') ?></th>211 <th scope="row"><label for="first_comment_url"><?php _e('First Comment URL') ?></label></th> 218 212 <td> 219 213 <input type="text" size='40' name="first_comment_url" id="first_comment_url" value="<?php echo esc_attr(get_site_option('first_comment_url')) ?>" /> … … 226 220 <table class="form-table"> 227 221 <tr valign="top"> 228 <th scope="row"><?php _e(' Upload media button') ?></th>222 <th scope="row"><?php _e('Media upload buttons') ?></th> 229 223 <?php $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ); ?> 230 224 <td><label><input type='checkbox' id="mu_media_buttons_image" name="mu_media_buttons[image]" value='1'<?php checked( !empty($mu_media_buttons[ 'image' ]) ) ?>/> <?php _e( 'Images' ); ?></label><br /> … … 237 231 <th scope="row"><?php _e('Site upload space') ?></th> 238 232 <td> 239 <label><input type='radio' id="upload_space_check_disabled" name="upload_space_check_disabled" value='0'<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '<input name="blog_upload_space" type="text" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 10) ) . '" size="3" />' ); ?></label><br /> 240 <label><input type='radio' id="upload_space_check_disabled" name="upload_space_check_disabled" value='1'<?php checked( get_site_option( 'upload_space_check_disabled' ) ) ?>/> <?php _e( 'Disabled' ); ?></label><br /></td> 241 </tr> 242 243 <tr valign="top"> 244 <th scope="row"><?php _e('Upload file types') ?></th> 233 <label><input type='checkbox' id="upload_space_check_disabled" name="upload_space_check_disabled" value='0'<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '<input name="blog_upload_space" type="text" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 10) ) . '" size="3" />' ); ?></label><br /> 234 </tr> 235 236 <tr valign="top"> 237 <th scope="row"><label for="upload_filetypes"><?php _e('Upload file types') ?></label></th> 245 238 <td><input name="upload_filetypes" type="text" id="upload_filetypes" class="large-text" value="<?php echo esc_attr( get_site_option('upload_filetypes', 'jpg jpeg png gif') ) ?>" size="45" /></td> 246 239 </tr> 247 240 248 241 <tr valign="top"> 249 <th scope="row">< ?php _e('Max upload file size') ?></th>250 <td>< input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo esc_attr( get_site_option('fileupload_maxk', 300) ) ?>" size="5" /> KB</td>242 <th scope="row"><label for="fileupload_maxk"><?php _e('Max upload file size') ?></label></th> 243 <td><?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="text" id="fileupload_maxk" value="' . esc_attr( get_site_option('fileupload_maxk', 300 ) ) . '" size="5" />' ); ?></td> 251 244 </tr> 252 245 </table> … … 263 256 ?> 264 257 <tr valign="top"> 265 <th>< ?php _e('Default Language') ?></th>258 <th><label for="WPLANG"><?php _e('Default Language') ?></label></th> 266 259 <td> 267 260 <select name="WPLANG" id="WPLANG">
Note: See TracChangeset
for help on using the changeset viewer.