diff -r 490d5cc509ed -r cf61fcea0001 wp/wp-admin/network/settings.php --- a/wp/wp-admin/network/settings.php Tue Jun 09 11:14:17 2015 +0000 +++ b/wp/wp-admin/network/settings.php Mon Oct 14 17:39:30 2019 +0200 @@ -10,39 +10,35 @@ /** Load WordPress Administration Bootstrap */ require_once( dirname( __FILE__ ) . '/admin.php' ); -/** WordPress Translation Install API */ +/** WordPress Translation Installation API */ require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); -if ( ! is_multisite() ) - wp_die( __( 'Multisite support is not enabled.' ) ); - if ( ! current_user_can( 'manage_network_options' ) ) - wp_die( __( 'You do not have permission to access this page.' ), 403 ); + wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); $title = __( 'Network Settings' ); $parent_file = 'settings.php'; -/** - * Print JavaScript in the header on the Network Settings screen. - * - * @since 4.1.0 -*/ -function network_settings_add_js() { -?> - -add_help_tab( array( @@ -61,8 +57,8 @@ get_current_screen()->set_help_sidebar( '

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

' . - '

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

' . - '

' . __('Support Forums') . '

' + '

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

' . + '

' . __('Support Forums') . '

' ); if ( $_POST ) { @@ -82,11 +78,12 @@ 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled', - 'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email', + 'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'new_admin_email', + 'first_comment_email', ); - // Handle translation install. - if ( ! empty( $_POST['WPLANG'] ) && wp_can_install_language_pack() ) { // @todo: Skip if already installed + // Handle translation installation. + if ( ! empty( $_POST['WPLANG'] ) && current_user_can( 'install_languages' ) && wp_can_install_language_pack() ) { $language = wp_download_language_pack( $_POST['WPLANG'] ); if ( $language ) { $_POST['WPLANG'] = $language; @@ -103,7 +100,7 @@ /** * Fires after the network options are updated. * - * @since MU + * @since MU (3.0.0) */ do_action( 'update_wpmu_options' ); @@ -114,34 +111,52 @@ include( ABSPATH . 'wp-admin/admin-header.php' ); if ( isset( $_GET['updated'] ) ) { - ?>

-

+

-

+

- +
- +

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

+ +
+

' . esc_html( $new_admin_email ) . '' + ); + printf( + ' %2$s', + esc_url( wp_nonce_url( network_admin_url( 'settings.php?dismiss=new_network_admin_email' ), 'dismiss_new_network_admin_email' ) ), + __( 'Cancel' ) + ); + ?>

+
+
-

+

@@ -153,12 +168,18 @@ @@ -171,14 +192,14 @@ update_site_option( 'registrationnotification', 'yes' ); ?> @@ -217,7 +238,7 @@
-
-
-
- +
+
+
+ ' . __( 'If registration is disabled, please set NOBLOGREDIRECT in wp-config.php to a URL you will redirect visitors to if they visit a non-existent site.' ) . '

'; + echo '

'; + /* translators: 1: NOBLOGREDIRECT 2: wp-config.php */ + printf( __( 'If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.' ), + 'NOBLOGREDIRECT', + 'wp-config.php' + ); + echo '

'; } ?>
- +
- +
-

+

@@ -273,13 +294,22 @@ + + + +
- +

+ +

+ +

+
@@ -289,12 +319,12 @@
-

+

-
- ' ); ?> + ' + ); + ?>

@@ -327,7 +363,7 @@ $translations = wp_get_available_translations(); if ( ! empty( $languages ) || ! empty( $translations ) ) { ?> -

+

@@ -338,14 +374,16 @@ $lang = ''; } - wp_dropdown_languages( array( - 'name' => 'WPLANG', - 'id' => 'WPLANG', - 'selected' => $lang, - 'languages' => $languages, - 'translations' => $translations, - 'show_available_translations' => wp_can_install_language_pack(), - ) ); + wp_dropdown_languages( + array( + 'name' => 'WPLANG', + 'id' => 'WPLANG', + 'selected' => $lang, + 'languages' => $languages, + 'translations' => $translations, + 'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(), + ) + ); ?> @@ -354,7 +392,7 @@ } ?> -

+

@@ -362,7 +400,7 @@