From ed4e4566016db2c18c9e6b05b82e23722eb93603 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Tue, 24 Jan 2017 13:12:28 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@39947 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/options-general.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php index 9f05a9a05c..0b54e08604 100644 --- a/src/wp-admin/options-general.php +++ b/src/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' ); ?>