REST API: Add constructor to the `WP_REST_Settings_Controller` class.

Provides consistency with the other API endpoint controller classes.

Props Soean.
Fixes #38429.

git-svn-id: https://develop.svn.wordpress.org/trunk@38954 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Rachel Baker 2016-10-26 13:44:37 +00:00
parent 4f033e5487
commit 3e3ac4d727
1 changed files with 10 additions and 3 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.