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
This commit is contained in:
parent
88c2b69d9e
commit
ed4e456601
|
@ -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>' ); ?>
|
||||
|
|
Loading…
Reference in New Issue