/** WordPress Translation Installation API */ 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.' ) ); }
// Used in the HTML title tag. $title = __( 'General Settings' ); $parent_file = 'options-general.php'; /* translators: Date and time format for exact current time, mainly about timezones, see https://www.php.net/manual/datetime.format.php */ $timezone_format = _x( 'Y-m-d H:i:s', 'timezone date format' );
$options_help = '<p>' . __( 'The fields on this screen determine some of the basics of your site setup.' ) . '</p>' . '<p>' . __( 'Most themes show the site title at the top of every page, in the title bar of the browser, and as the identifying name for syndicated feeds. Many themes also show the tagline.' ) . '</p>';
if ( ! is_multisite() ) { $options_help .= '<p>' . __( 'Two terms you will want to know are the WordPress URL and the site URL. The WordPress URL is where the core WordPress installation files are, and the site URL is the address a visitor uses in the browser to go to your site.' ) . '</p>' . '<p>' . sprintf( /* translators: %s: Documentation URL. */ __( 'Though the terms refer to two different concepts, in practice, they can be the same address or different. For example, you can have the core WordPress installation files in the root directory (<code>https://example.com</code>), in which case the two URLs would be the same. Or the <a href="%s">WordPress files can be in a subdirectory</a> (<code>https://example.com/wordpress</code>). In that case, the WordPress URL and the site URL would be different.' ), __( 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/' ) ) . '</p>' . '<p>' . sprintf( /* translators: 1: http://, 2: https:// */ __( 'Both WordPress URL and site URL can start with either %1$s or %2$s. A URL starting with %2$s requires an SSL certificate, so be sure that you have one before changing to %2$s. With %2$s, a padlock will appear next to the address in the browser address bar. Both %2$s and the padlock signal that your site meets some basic security requirements, which can build trust with your visitors and with search engines.' ), '<code>http://</code>', '<code>https://</code>' ) . '</p>' . '<p>' . __( 'If you want site visitors to be able to register themselves, check the membership box. If you want the site administrator to register every new user, leave the box unchecked. In either case, you can set a default user role for all new users.' ) . '</p>'; }
$options_help .= '<p>' . __( 'You can set the language, and WordPress will automatically download and install the translation files (available if your filesystem is writable).' ) . '</p>' . '<p>' . __( 'UTC means Coordinated Universal Time.' ) . '</p>' . '<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>';
// Handle alt text for site icon on page load. $site_icon_id = (int) get_option( 'site_icon' ); $app_icon_alt_value = ''; $browser_icon_alt_value = '';
$site_icon_url = get_site_icon_url();
if ( $site_icon_id ) { $img_alt = get_post_meta( $site_icon_id, '_wp_attachment_image_alt', true ); $filename = wp_basename( $site_icon_url ); $app_icon_alt_value = sprintf( /* translators: %s: The selected image filename. */ __( 'App icon preview: The current image has no alternative text. The file name is: %s' ), $filename );
$browser_icon_alt_value = sprintf( /* translators: %s: The selected image filename. */ __( 'Browser icon preview: The current image has no alternative text. The file name is: %s' ), $filename );
if ( $img_alt ) { $app_icon_alt_value = sprintf( /* translators: %s: The selected image alt text. */ __( 'App icon preview: Current image: %s' ), $img_alt );
$browser_icon_alt_value = sprintf( /* translators: %s: The selected image alt text. */ __( 'Browser icon preview: Current image: %s' ), $img_alt ); } } ?>
<p class="description"> <?php printf( /* translators: 1: pixel value for icon size. 2: pixel value for icon size. */ __( 'The Site Icon is what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. It should be square and at least <code>%1$s by %2$s</code> pixels.' ), 512, 512 ); ?> </p>
<p class="description" id="timezone-description"> <?php printf( /* translators: %s: UTC abbreviation */ __( 'Choose either a city in the same timezone as you or a %s (Coordinated Universal Time) time offset.' ), '<abbr>UTC</abbr>' ); ?> </p>
<?php if ( $check_zone_info && $tzstring ) : ?> <p class="timezone-info"> <span> <?php $now = new DateTime( 'now', new DateTimeZone( $tzstring ) ); $dst = (bool) $now->format( 'I' );
if ( $dst ) { _e( 'This timezone is currently in daylight saving time.' ); } else { _e( 'This timezone is currently in standard time.' ); } ?> <br /> <?php if ( in_array( $tzstring, timezone_identifiers_list( DateTimeZone::ALL_WITH_BC ), true ) ) { $transitions = timezone_transitions_get( timezone_open( $tzstring ), time() );
// 0 index is the state at current time, 1 index is the next transition, if any. if ( ! empty( $transitions[1] ) ) { echo ' '; $message = $transitions[1]['isdst'] ? /* translators: %s: Date and time. */ __( 'Daylight saving time begins on: %s.' ) : /* translators: %s: Date and time. */ __( 'Standard time begins on: %s.' ); printf( $message, '<code>' . wp_date( __( 'F j, Y' ) . ' ' . __( 'g:i a' ), $transitions[1]['ts'] ) . '</code>' ); } else { _e( 'This timezone does not observe daylight saving time.' ); } } ?> </span> </p> <?php endif; ?> </td>
</tr> <tr> <th scope="row"><?php _e( 'Date Format' ); ?></th> <td> <fieldset><legend class="screen-reader-text"><span> <?php /* translators: Hidden accessibility text. */ _e( 'Date Format' ); ?> </span></legend> <?php /** * Filters the default date formats. * * @since 2.7.0 * @since 4.0.0 Replaced the `Y/m/d` format with `Y-m-d` (ISO date standard YYYY-MM-DD). * @since 6.8.0 Added the `d.m.Y` format. * * @param string[] $default_date_formats Array of default date formats. */ $date_formats = array_unique( apply_filters( 'date_formats', array( __( 'F j, Y' ), 'Y-m-d', 'm/d/Y', 'd/m/Y', 'd.m.Y' ) ) );