REST API: Add constructor to the WP_REST_Settings_Controller class.

Provides consistency with the other API endpoint controller classes.

Props Soean.
Fixes #38429.
Built from https://develop.svn.wordpress.org/trunk@38954


git-svn-id: http://core.svn.wordpress.org/trunk@38897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Rachel Baker 2016-10-26 13:45:47 +00:00
parent 4bd54798ec
commit 0c2a6184eb
2 changed files with 11 additions and 4 deletions

View File

@ -3,11 +3,18 @@
/**
* Manage a WordPress site's settings.
*/
class WP_REST_Settings_Controller extends WP_REST_Controller {
protected $rest_base = 'settings';
protected $namespace = 'wp/v2';
/**
* Constructor.
*
* @since 4.7.0
* @access public
*/
public function __construct() {
$this->namespace = 'wp/v2';
$this->rest_base = 'settings';
}
/**
* Register the routes for the objects of the controller.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38953';
$wp_version = '4.7-alpha-38954';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.