From d0bdcb93f02951809fdbe74fcdc4ccc4c705e493 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Fri, 20 Jan 2017 17:38:15 +0000 Subject: [PATCH] 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 --- src/wp-admin/options.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php index 4c7e2676f1..d2e1c0374f 100644 --- a/src/wp-admin/options.php +++ b/src/wp-admin/options.php @@ -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( '

' . __( 'Cheatin’ uh?' ) . '

' . '

' . __( 'Sorry, you are not allowed to delete these items.' ) . '

', @@ -160,8 +160,9 @@ if ( 'update' == $action ) { wp_die( __( 'ERROR: 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 ];