Ticket #10970: 10970.3.diff
File 10970.3.diff, 2.4 KB (added by , 15 years ago) |
---|
-
wp-admin/options-general.php
69 69 </tr> 70 70 <tr valign="top"> 71 71 <th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th> 72 <td><input name="blogdescription" type="text" id="blogdescription" 72 <td><input name="blogdescription" type="text" id="blogdescription" value="<?php form_option('blogdescription'); ?>" class="regular-text" /> 73 73 <span class="description"><?php _e('In a few words, explain what this blog is about.') ?></span></td> 74 74 </tr> 75 75 <?php if ( !is_multisite() ) { ?> 76 76 <tr valign="top"> 77 77 <th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th> 78 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td> 78 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" class="regular-text code disabled" disabled="disabled" /> 79 <span class="description"><?php _e('For reference only'); ?></span></td> 79 80 </tr> 80 81 <tr valign="top"> 81 82 <th scope="row"><label for="home"><?php _e('Blog address (URL)') ?></label></th> -
wp-admin/options.php
37 37 $mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass'); 38 38 39 39 if ( !is_multisite() ) { 40 if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl';41 40 if ( !defined( 'WP_HOME' ) ) $whitelist_options['general'][] = 'home'; 42 41 $whitelist_options['general'][] = 'admin_email'; 43 42 $whitelist_options['general'][] = 'users_can_register'; … … 115 114 $_POST['gmt_offset'] = preg_replace('/UTC\+?/', '', $_POST['gmt_offset']); 116 115 $_POST['timezone_string'] = ''; 117 116 } 117 118 // Make 'www' preference consistent 119 $siteurl = get_option('siteurl'); 120 if ( FALSE !== strpos($_POST['home'], '://www.') ) 121 update_option('siteurl', str_replace('://', '://www.', $siteurl)); 122 else 123 update_option('siteurl', str_replace('://www.', '://', $siteurl)); 118 124 } 119 125 120 126 if ( $options ) {