diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/options-general.php --- a/wp/wp-admin/options-general.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/options-general.php Tue Dec 15 13:49:49 2020 +0100 @@ -7,10 +7,10 @@ */ /** WordPress Administration Bootstrap */ -require_once( dirname( __FILE__ ) . '/admin.php' ); +require_once __DIR__ . '/admin.php'; /** WordPress Translation Installation API */ -require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); +require_once ABSPATH . 'wp-admin/includes/translation-install.php'; if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); @@ -18,7 +18,7 @@ $title = __( 'General Settings' ); $parent_file = 'options-general.php'; -/* translators: date and time format for exact current time, mainly about timezones, see https://secure.php.net/date */ +/* translators: Date and time format for exact current time, mainly about timezones, see https://www.php.net/date */ $timezone_format = _x( 'Y-m-d H:i:s', 'timezone date format' ); add_action( 'admin_head', 'options_general_add_js' ); @@ -45,11 +45,11 @@ get_current_screen()->set_help_sidebar( '

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

' . - '

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

' . + '

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

' . '

' . __( 'Support' ) . '

' ); -include( ABSPATH . 'wp-admin/admin-header.php' ); +require_once ABSPATH . 'wp-admin/admin-header.php'; ?>
@@ -73,7 +73,8 @@ want your site home page to be different from your WordPress installation directory.' ), - __( 'https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory' ) + __( 'https://wordpress.org/support/article/giving-wordpress-its-own-directory/' ) ); ?>

@@ -107,18 +108,18 @@ - + -

The new address will not become active until confirmed.' ); ?>

+

The new address will not become active until confirmed.' ); ?>

' . esc_html( $new_admin_email ) . '' ); @@ -156,17 +157,17 @@ $languages = get_available_languages(); $translations = wp_get_available_translations(); -if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG && ! in_array( WPLANG, $languages ) ) { +if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG && ! in_array( WPLANG, $languages, true ) ) { $languages[] = WPLANG; } if ( ! empty( $languages ) || ! empty( $translations ) ) { ?> - + @@ -203,7 +209,7 @@ $tzstring = ''; } -if ( empty( $tzstring ) ) { // Create a UTC+- zone if no timezone string exists +if ( empty( $tzstring ) ) { // Create a UTC+- zone if no timezone string exists. $check_zone_info = false; if ( 0 == $current_offset ) { $tzstring = 'UTC+0'; @@ -222,15 +228,22 @@ -

+

+UTC' + ); + ?> +

' . __( 'UTC' ) . '', + /* translators: %s: UTC time. */ + __( 'Universal time is %s.' ), '' . date_i18n( $timezone_format, false, true ) . '' ); ?> @@ -238,8 +251,8 @@ ' . date_i18n( $timezone_format ) . '' ); @@ -252,10 +265,10 @@

format( 'I' ); + + if ( $dst ) { _e( 'This timezone is currently in daylight saving time.' ); } else { _e( 'This timezone is currently in standard time.' ); @@ -263,41 +276,25 @@ ?>
$right_now ) { - $found = true; - break; - } - } - - if ( $found ) { + // 0 index is the state at current time, 1 index is the next transition, if any. + if ( ! empty( $transitions[1] ) ) { echo ' '; - $message = $tr['isdst'] ? - /* translators: %s: date and time */ + $message = $transitions[1]['isdst'] ? + /* translators: %s: Date and time. */ __( 'Daylight saving time begins on: %s.' ) : - /* translators: %s: date and time */ + /* translators: %s: Date and time. */ __( 'Standard time begins on: %s.' ); - // 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( - __( 'F j, Y' ) . ' ' . __( 'g:i a' ), - $tr['ts'] + ( $tz_offset - $tr['offset'] ) - ) . '' + '' . wp_date( __( 'F j, Y' ) . ' ' . __( 'g:i a' ), $transitions[1]['ts'] ) . '' ); } else { _e( 'This timezone does not observe daylight saving time.' ); } } - // Set back to UTC. - date_default_timezone_set( 'UTC' ); ?>

@@ -324,7 +321,7 @@ foreach ( $date_formats as $format ) { echo "\t