From d7e0ae883c62b547e359b09c1a0988fc57765443 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Sat, 3 Dec 2016 05:16:44 +0000 Subject: [PATCH] REST API: Site URL setting should not be present on multisite installations. The `siteurl` setting is registered and made available to the REST API. On a multisite installation, this setting is not configurable from the General Settings screen, but due to the above it is configurable from the REST API. Props peterwilsoncc. Fixes #39005. Built from https://develop.svn.wordpress.org/trunk@39468 git-svn-id: http://core.svn.wordpress.org/trunk@39408 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 aa98477417..2ac98bc135 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1737,16 +1737,18 @@ function register_initial_settings() { 'description' => __( 'Site tagline.' ), ) ); - register_setting( 'general', 'siteurl', array( - 'show_in_rest' => array( - 'name' => 'url', - 'schema' => array( - 'format' => 'uri', + if ( ! is_multisite() ) { + register_setting( 'general', 'siteurl', array( + 'show_in_rest' => array( + 'name' => 'url', + 'schema' => array( + 'format' => 'uri', + ), ), - ), - 'type' => 'string', - 'description' => __( 'Site URL.' ), - ) ); + 'type' => 'string', + 'description' => __( 'Site URL.' ), + ) ); + } register_setting( 'general', 'admin_email', array( 'show_in_rest' => array( diff --git a/wp-includes/version.php b/wp-includes/version.php index 6002647804..6d5e0448c5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-39466'; +$wp_version = '4.8-alpha-39468'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.