mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user