Make WordPress Core


Ignore:
Timestamp:
01/24/2017 01:12:28 PM (8 years ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-general.php

    r39885 r39947  
    150150            // Add note about deprecated WPLANG constant.
    151151            if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && $locale !== WPLANG ) {
    152                 if ( is_super_admin() ) {
     152                if ( is_multisite() && current_user_can( 'manage_network_options' )
     153                    || ! is_multisite() && current_user_can( 'manage_options' ) ) {
    153154                    ?>
    154155                    <p class="description">
Note: See TracChangeset for help on using the changeset viewer.