Changes from branches/3.1/wp-admin/options-general.php at r18356 to trunk/wp-admin/options-general.php at r18386
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-general.php
r18356 r18386 67 67 '<p>' . __('Remember to click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' . 68 68 '<p><strong>' . __('For more information:') . '</strong></p>' . 69 '<p>' . __('<a href="http://codex.wordpress.org/Settings_General_S ubPanel" target="_blank">Documentation on General Settings</a>') . '</p>' .69 '<p>' . __('<a href="http://codex.wordpress.org/Settings_General_Screen" target="_blank">Documentation on General Settings</a>') . '</p>' . 70 70 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 71 71 ); … … 136 136 <tr> 137 137 <?php 138 if ( !wp_timezone_supported() ) : // no magic timezone support here139 ?>140 <th scope="row"><label for="gmt_offset"><?php _e('Timezone') ?> </label></th>141 <td>142 <select name="gmt_offset" id="gmt_offset">143 <?php144 $current_offset = get_option('gmt_offset');145 $offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,146 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14);147 foreach ( $offset_range as $offset ) {148 if ( 0 < $offset )149 $offset_name = '+' . $offset;150 elseif ( 0 == $offset )151 $offset_name = '';152 else153 $offset_name = (string) $offset;154 155 $offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name);156 157 $selected = '';158 if ( $current_offset == $offset ) {159 $selected = " selected='selected'";160 $current_offset_name = $offset_name;161 }162 echo "<option value=\"" . esc_attr($offset) . "\"$selected>" . sprintf(__('UTC %s'), $offset_name) . '</option>';163 }164 ?>165 </select>166 <?php _e('hours'); ?>167 <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n( $time_format, false, 'gmt')); ?></span>168 <?php if ($current_offset) : ?>169 <span id="local-time"><?php printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, date_i18n($time_format)); ?></span>170 <?php endif; ?>171 <br />172 <span class="description"><?php _e('Unfortunately, you have to manually update this for daylight saving time. The PHP Date/Time library is not supported by your web host.'); ?></span>173 </td>174 <?php175 else: // looks like we can do nice timezone selection!176 138 $current_offset = get_option('gmt_offset'); 177 139 $tzstring = get_option('timezone_string'); … … 201 163 </select> 202 164 203 165 <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n($timezone_format, false, 'gmt')); ?></span> 204 166 <?php if ( get_option('timezone_string') || !empty($current_offset) ) : ?> 205 167 <span id="local-time"><?php printf(__('Local time is <code>%1$s</code>'), date_i18n($timezone_format)); ?></span> … … 221 183 <br /> 222 184 <?php 223 if ( function_exists('timezone_transitions_get') ) { 185 $allowed_zones = timezone_identifiers_list(); 186 187 if ( in_array( $tzstring, $allowed_zones) ) { 224 188 $found = false; 225 189 $date_time_zone_selected = new DateTimeZone($tzstring); … … 251 215 </td> 252 216 253 <?php endif; ?>254 217 </tr> 255 218 <tr>
Note: See TracChangeset
for help on using the changeset viewer.