WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/03/2016 05:17:26 AM (3 years ago)
Author:
pento
Message:

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.

Merge of [39468] to the 4.7 branch.

Props peterwilsoncc.
Fixes #39005.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/option.php

    r39407 r39469  
    17381738    ) );
    17391739
    1740     register_setting( 'general', 'siteurl', array(
    1741         'show_in_rest' => array(
    1742             'name'    => 'url',
    1743             'schema'  => array(
    1744                 'format' => 'uri',
     1740    if ( ! is_multisite() ) {
     1741        register_setting( 'general', 'siteurl', array(
     1742            'show_in_rest' => array(
     1743                'name'    => 'url',
     1744                'schema'  => array(
     1745                    'format' => 'uri',
     1746                ),
    17451747            ),
    1746         ),
    1747         'type'         => 'string',
    1748         'description'  => __( 'Site URL.' ),
    1749     ) );
     1748            'type'         => 'string',
     1749            'description'  => __( 'Site URL.' ),
     1750        ) );
     1751    }
    17501752
    17511753    register_setting( 'general', 'admin_email', array(
Note: See TracChangeset for help on using the changeset viewer.