From ceee0b78e12f546f661ade46cabfde277e820703 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 3 Dec 2016 05:38:38 +0000 Subject: [PATCH] REST API: Register the admin_email setting in single site only. fixes #38990. git-svn-id: https://develop.svn.wordpress.org/trunk@39470 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 2ac98bc135..ac17c2f501 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -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(