From cafb341db6d364976b9c5310cabc345e80f8e199 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 3 Dec 2016 05:39:42 +0000 Subject: [PATCH] REST API: Register the admin_email setting in single site only. 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 --- wp-includes/option.php | 20 +++++++++++--------- wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index 2ac98bc135..ac17c2f501 100644 --- a/wp-includes/option.php +++ b/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( diff --git a/wp-includes/version.php b/wp-includes/version.php index 6d5e0448c5..4efc618a8f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.