Skip to content

Commit

Permalink
REST API: Register the admin_email setting in single site only.
Browse files Browse the repository at this point in the history
fixes #38990.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Dec 3, 2016
1 parent d7e0ae8 commit cafb341
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions wp-includes/option.php
Original file line number Diff line number Diff line change
Expand Up @@ -1750,16 +1750,18 @@ function register_initial_settings() {
) );
}

register_setting( 'general', 'admin_email', array(
'show_in_rest' => array(
'name' => 'email',
'schema' => array(
'format' => 'email',
if ( ! is_multisite() ) {
register_setting( 'general', 'admin_email', array(
'show_in_rest' => array(
'name' => 'email',
'schema' => array(
'format' => 'email',
),
),
),
'type' => 'string',
'description' => is_multisite() ? __( 'This address is used for admin purposes. If you change this we will send you an email at your new address to confirm it. The new address will not become active until confirmed.' ) : __( 'This address is used for admin purposes, like new user notification.' ),
) );
'type' => 'string',
'description' => __( 'This address is used for admin purposes, like new user notification.' ),
) );
}

register_setting( 'general', 'timezone_string', array(
'show_in_rest' => array(
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39468';
$wp_version = '4.8-alpha-39470';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit cafb341

Please sign in to comment.