mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@39468 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user