mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 07:22:01 +01: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. 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:
parent
4bd54798ec
commit
0c2a6184eb
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user