Multisite: Replace `is_super_admin()` with `manage_network_options` in `wp-admin/options.php`.

Props sathyapulse.
Fixes #39200. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39933 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz 2017-01-20 17:38:15 +00:00
parent 60f3612684
commit d0bdcb93f0
1 changed files with 3 additions and 2 deletions

View File

@ -74,7 +74,7 @@ if ( is_multisite() ) {
}
}
if ( is_multisite() && ! is_super_admin() && 'update' != $action ) {
if ( is_multisite() && ! current_user_can( 'manage_network_options' ) && 'update' != $action ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
@ -160,8 +160,9 @@ if ( 'update' == $action ) {
wp_die( __( '<strong>ERROR</strong>: options page not found.' ) );
if ( 'options' == $option_page ) {
if ( is_multisite() && ! is_super_admin() )
if ( is_multisite() && ! current_user_can( 'manage_network_options' ) ) {
wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
}
$options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
} else {
$options = $whitelist_options[ $option_page ];