X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/fd1685fbc29cf422e0d23f1bf1815bc023be805d..a5227bf01edbe6660486c9f5c0f0ed7b7fea3130:/wp-admin/options-general.php diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index def21249..1aaee472 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -9,8 +9,8 @@ /** WordPress Administration Bootstrap */ require_once('./admin.php'); -if ( ! current_user_can('manage_options') ) - wp_die(__('You do not have sufficient permissions to manage options for this blog.')); +if ( ! current_user_can( 'manage_options' ) ) + wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); $title = __('General Settings'); $parent_file = 'options-general.php'; @@ -50,6 +50,18 @@ function add_js() { } add_filter('admin_head', 'add_js'); +add_contextual_help($current_screen, + '

' . __('The fields on this screen determine some of the basics of your site setup.') . '

' . + '

' . __('Most themes display the site title at the top of every page, in the title bar of the browser, and as the identifying name for syndicated feeds. The tagline is also displayed by many themes.') . '

' . + '

' . __('The WordPress URL and the Site URL can be the same (example.com) or different; for example, having the WordPress core files (example.com/wordpress) in a subdirectory instead of the root directory.') . '

' . + '

' . __('If you want site visitors to be able to register themselves, as opposed to being registered by the site administrator, check the membership box. A default user role can be set for all new users, whether self-registered or registered by the site administrator.') . '

' . + '

' . __('UTC means Coordinated Universal Time.') . '

' . + '

' . __('Remember to click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

' . + '

' . __('For more information:') . '

' . + '

' . __('Documentation on General Settings') . '

' . + '

' . __('Support Forums') . '

' +); + include('./admin-header.php'); ?> @@ -62,22 +74,23 @@ include('./admin-header.php'); - + + + - + - - + + @@ -97,6 +110,21 @@ include('./admin-header.php'); + + + + + +%2$s'), $current_offset_name, date_i18n($time_format)); ?>
- += 0) ? '+' : '') . $offnum; + +$check_zone_info = true; + +// Remove old Etc mappings. Fallback to gmt_offset. +if ( false !== strpos($tzstring,'Etc/GMT') ) + $tzstring = ''; + +if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists + $check_zone_info = false; + if ( 0 == $current_offset ) + $tzstring = 'UTC+0'; + elseif ($current_offset < 0) + $tzstring = 'UTC' . $current_offset; + else + $tzstring = 'UTC+' . $current_offset; } + ?> + + + + + +
-
" /> class="regular-text code" />
" /> -to be different from the directory you installed WordPress.'); ?> class="regular-text code" /> +to be different from the directory you installed WordPress.'); ?>
+The new address will not become active until confirmed.') ?> + +
+

%1$s. Cancel'), $new_admin_email, esc_url( admin_url( 'options.php?dismiss=new_admin_email' ) ) ); ?>

+
+ +
@@ -153,40 +193,50 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists UTC time is %s'), date_i18n($timezone_format, false, 'gmt')); ?> - + %1$s'), date_i18n($timezone_format)); ?>
+
-
time()) { + if ( function_exists('timezone_transitions_get') ) { + $found = false; + $date_time_zone_selected = new DateTimeZone($tzstring); + $tz_offset = timezone_offset_get($date_time_zone_selected, date_create()); + $right_now = time(); + foreach ( timezone_transitions_get($date_time_zone_selected) as $tr) { + if ( $tr['ts'] > $right_now ) { $found = true; break; } } - if ( isset($found) && $found === true ) { + if ( $found ) { echo ' '; $message = $tr['isdst'] ? - __('Daylight savings time begins on: %s.') : + __('Daylight saving time begins on: %s.') : __('Standard time begins on: %s.'); - printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $tr['ts'] ) ); + // Add the difference between the current offset and the new offset to ts to get the correct transition time from date_i18n(). + printf( $message, date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $tr['ts'] + ($tz_offset - $tr['offset']) ) ); } else { - _e('This timezone does not observe daylight savings time.'); + _e('This timezone does not observe daylight saving time.'); } } + // Set back to UTC. + date_default_timezone_set('UTC'); ?>
@@ -207,13 +257,13 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists 'd/m/Y', ) ); - $custom = TRUE; + $custom = true; foreach ( $date_formats as $format ) { echo "\t
\n"; } @@ -239,13 +289,13 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists 'H:i', ) ); - $custom = TRUE; + $custom = true; foreach ( $time_formats as $format ) { echo "\t
\n"; } @@ -269,6 +319,21 @@ endfor;
+ +