From 82dc367cd4cde168de0fcdf6df9adcacaa688a8d Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Tue, 24 Jan 2017 13:13:41 +0000 Subject: [PATCH] Multisite: Replace `is_super_admin()` with a proper capability check when showing a notice about `WPLANG`. In multisite, the notice is displayed to users that have the `manage_network_options` capability. In non-multisite, the notice is displayed to users with the `manage_options` capability. Props Dhaval Parekh. Fixes #39207. See #37616. Built from https://develop.svn.wordpress.org/trunk@39947 git-svn-id: http://core.svn.wordpress.org/trunk@39884 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/options-general.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index 9f05a9a05c..0b54e08604 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -149,7 +149,8 @@ if ( ! empty( $languages ) || ! empty( $translations ) ) { // Add note about deprecated WPLANG constant. if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && $locale !== WPLANG ) { - if ( is_super_admin() ) { + if ( is_multisite() && current_user_can( 'manage_network_options' ) + || ! is_multisite() && current_user_can( 'manage_options' ) ) { ?>

WPLANG', 'wp-config.php' ); ?> diff --git a/wp-includes/version.php b/wp-includes/version.php index 4ba0bc998a..42f6a49a6a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-39946'; +$wp_version = '4.8-alpha-39947'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.