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
This commit is contained in:
Felix Arntz 2017-01-24 13:13:41 +00:00
parent 34ad21bcfa
commit 82dc367cd4
2 changed files with 3 additions and 2 deletions

View File

@ -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' ) ) {
?>
<p class="description">
<strong><?php _e( 'Note:' ); ?></strong> <?php printf( __( 'The %s constant in your %s file is no longer needed.' ), '<code>WPLANG</code>', '<code>wp-config.php</code>' ); ?>

View File

@ -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.