diff --git wp-admin/css/wp-admin.css wp-admin/css/wp-admin.css
index ebb78cc..e67617f 100644
|
|
abbr.required { |
3954 | 3954 | bottom: 1px; |
3955 | 3955 | } |
3956 | 3956 | |
| 3957 | #timezone_suggest_working { |
| 3958 | padding-bottom: 4px; |
| 3959 | vertical-align: bottom; |
| 3960 | display: none; |
| 3961 | } |
| 3962 | |
| 3963 | #timezone_suggest_result { |
| 3964 | display: none; |
| 3965 | color: #f00; |
| 3966 | } |
| 3967 | |
| 3968 | #timezone_suggest_use { |
| 3969 | display: none; |
| 3970 | margin-left: 5px; |
| 3971 | } |
| 3972 | |
3957 | 3973 | ul#dismissed-updates { |
3958 | 3974 | display: none; |
3959 | 3975 | } |
diff --git wp-admin/options-general.php wp-admin/options-general.php
index fdae33a..959945c 100644
|
|
function options_general_add_js() { |
50 | 50 | date : format.val() |
51 | 51 | }, function(d) { format.siblings('.spinner').hide(); format.siblings('.example').text(d); } ); |
52 | 52 | }); |
| 53 | $("#timezone_suggest").click(function(){ |
| 54 | $("#timezone_suggest_working").animate({opacity:'show'},500); |
| 55 | $.ajax({ |
| 56 | type: 'GET', |
| 57 | dataType: 'jsonp', |
| 58 | url: 'http://api.wordpress.org/core/ip-to-zoneinfo/1.0/', |
| 59 | success: function(data){ |
| 60 | if (data.errorcode) { |
| 61 | $("#timezone_suggest_result span").text('<?php echo esc_js(__('Unable to suggest timezone')); ?>'); |
| 62 | } else { |
| 63 | var text = '<?php echo esc_js(__('Based on your IP address, we suggest the %s timezone.')); ?>'; |
| 64 | text = text.replace('%s', data.timezoneId); |
| 65 | $("#timezone_suggest_result span").text(text); |
| 66 | $("#timezone_suggest_use").show().click(function () { |
| 67 | $("#timezone_string").val(data.timezoneId); |
| 68 | $("#timezone_suggest_result").animate({opacity:'hide'}, 2000, function() { |
| 69 | $("#timezone_suggest_use").hide(); |
| 70 | }); |
| 71 | }); |
| 72 | } |
| 73 | $("#timezone_suggest_working").animate( |
| 74 | {opacity:'hide'}, |
| 75 | 500, |
| 76 | 'linear', |
| 77 | function(){ |
| 78 | $("#timezone_suggest_result").animate({opacity:'show'},1000); |
| 79 | } |
| 80 | ); |
| 81 | } |
| 82 | }); |
| 83 | }); |
53 | 84 | }); |
54 | 85 | //]]> |
55 | 86 | </script> |
… |
… |
if ( ! is_multisite() ) { |
66 | 97 | } |
67 | 98 | |
68 | 99 | $options_help .= '<p>' . __('UTC means Coordinated Universal Time.') . '</p>' . |
| 100 | '<p>' . __('The timezone suggest utility is powered by the GeoNames database. <code>api.wordpress.org</code> is used to suggest this timezone, based on your IP. No information is stored as a result of this utility.') . '</p>' . |
69 | 101 | '<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>'; |
70 | 102 | |
71 | 103 | get_current_screen()->add_help_tab( array( |
… |
… |
if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists |
176 | 208 | <?php if ( get_option('timezone_string') || !empty($current_offset) ) : ?> |
177 | 209 | <span id="local-time"><?php printf(__('Local time is <code>%1$s</code>'), date_i18n($timezone_format)); ?></span> |
178 | 210 | <?php endif; ?> |
179 | | <p class="description"><?php _e('Choose a city in the same timezone as you.'); ?></p> |
| 211 | <input id="timezone_suggest" type="button" class="button" value="<?php esc_attr_e('Suggest a time zone'); ?>" /> |
| 212 | <img id="timezone_suggest_working" src="images/wpspin_light.gif" width="16" height="16" /><br /> |
| 213 | <p id="timezone_suggest_result"> |
| 214 | <span></span><input id="timezone_suggest_use" type="button" class="button" value="<?php esc_attr_e('Use this timezone') ?>" /> |
| 215 | </p> |
| 216 | <span class="description"><?php _e('WordPress can suggest a time zone for you based on your computers IP address, or you may manually select a city in the same time zone as you.'); ?></span> |
180 | 217 | <?php if ($check_zone_info && $tzstring) : ?> |
181 | 218 | <br /> |
182 | 219 | <span> |