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:
parent
dd23a8f48c
commit
6e5cd6d397
|
@ -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(
|
wp_die(
|
||||||
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
||||||
'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
|
'<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.' ) );
|
wp_die( __( '<strong>ERROR</strong>: options page not found.' ) );
|
||||||
|
|
||||||
if ( 'options' == $option_page ) {
|
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.' ) );
|
wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
|
||||||
|
}
|
||||||
$options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
|
$options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
|
||||||
} else {
|
} else {
|
||||||
$options = $whitelist_options[ $option_page ];
|
$options = $whitelist_options[ $option_page ];
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue