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

Props sathyapulse.
Fixes #39200. See #37616.

Built from https://develop.svn.wordpress.org/trunk@39933


git-svn-id: http://core.svn.wordpress.org/trunk@39870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Felix Arntz 2017-01-20 17:39:41 +00:00
parent dd23a8f48c
commit 6e5cd6d397
2 changed files with 4 additions and 3 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 ];

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39932';
$wp_version = '4.8-alpha-39933';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.