X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/5964d2279dc52bdfe105f9bfa17e04337d47a3fa..ac7339a398e6df50f722bc9616291ce5447d8e5e:/wp-admin/options-general.php diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index fdae33a6..cdcde0a9 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -7,7 +7,10 @@ */ /** WordPress Administration Bootstrap */ -require_once('./admin.php'); +require_once( dirname( __FILE__ ) . '/admin.php' ); + +/** WordPress Translation Install API */ +require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); if ( ! current_user_can( 'manage_options' ) ) wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); @@ -15,7 +18,7 @@ if ( ! current_user_can( 'manage_options' ) ) $title = __('General Settings'); $parent_file = 'options-general.php'; /* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */ -$timezone_format = _x('Y-m-d G:i:s', 'timezone date format'); +$timezone_format = _x('Y-m-d H:i:s', 'timezone date format'); /** * Display JavaScript on the page. @@ -25,33 +28,54 @@ $timezone_format = _x('Y-m-d G:i:s', 'timezone date format'); function options_general_add_js() { ?> ' . __('If you want site visitors to be able to register themselves, as opposed to 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 admin.') . '

'; } -$options_help .= '

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

' . +$options_help .= '

' . __( 'You can set the language, and the translation files will be automatically downloaded and installed (available if your filesystem is writable).' ) . '

' . + '

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

' . '

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

'; get_current_screen()->add_help_tab( array( @@ -76,63 +101,62 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

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

' . - '

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

' . - '

' . __('Support Forums') . '

' + '

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

' . + '

' . __('Support Forums') . '

' ); -include('./admin-header.php'); +include( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

-
+ - + - + - + - + - + - + - + - + - + - + - + - + - @@ -262,12 +287,14 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists @@ -292,6 +321,8 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists + - - +$languages = get_available_languages(); +$translations = wp_get_available_translations(); +if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG && ! in_array( WPLANG, $languages ) ) { + $languages[] = WPLANG; +} +if ( ! empty( $languages ) || ! empty( $translations ) ) { + ?> + + -
-

+

class="regular-text code" /> class="regular-text code" />
class="regular-text code" /> -

to be different from the directory you installed WordPress.'); ?>

class="regular-text code" /> +

want your site home page to be different from your WordPress installation directory.' ); ?>

-

+

-

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

+
+

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

@@ -168,7 +192,7 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
- @@ -176,7 +200,7 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists %1$s'), date_i18n($timezone_format)); ?> -

+


@@ -229,13 +253,15 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
' . date_i18n( $format ) . "
\n"; + echo ' /> ' . date_i18n( $format ) . "
\n"; } echo ' ' . date_i18n( get_option('date_format') ) . " \n"; - - echo "\t

" . __('Documentation on date and time formatting.') . "

\n"; + echo '/> ' . __( 'Custom:' ) . ' ' . __( 'enter a custom date format in the following field' ) . "\n"; + echo ' ' . __( 'example:' ) . ' ' . date_i18n( get_option('date_format') ) . " \n"; ?>
' . date_i18n( $format ) . "
\n"; + echo ' /> ' . date_i18n( $format ) . "
\n"; } echo ' ' . date_i18n( get_option('time_format') ) . " \n"; - ; + echo '/> ' . __( 'Custom:' ) . ' ' . __( 'enter a custom time format in the following field' ) . "\n"; + echo ' ' . __( 'example:' ) . ' ' . date_i18n( get_option('time_format') ) . " \n"; + + echo "\t

" . __('Documentation on date and time formatting.') . "

\n"; ?>
- + 'WPLANG', + 'id' => 'WPLANG', + 'selected' => $locale, + 'languages' => $languages, + 'translations' => $translations, + 'show_available_translations' => ( ! is_multisite() || is_super_admin() ) && wp_can_install_language_pack(), + ) ); + + // Add note about deprecated WPLANG constant. + if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && $locale !== WPLANG ) { + if ( is_super_admin() ) { + ?> +

+ WPLANG', 'wp-config.php' ); ?> +

+
@@ -324,4 +384,4 @@ endfor;
- +