mirror of
git://develop.git.wordpress.org/
synced 2025-04-26 15:13:30 +02: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:
parent
4f033e5487
commit
3e3ac4d727
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user