From 3e3ac4d7278c2b67349339c3b2f8a5d5ee19c0cf Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Wed, 26 Oct 2016 13:44:37 +0000 Subject: [PATCH] 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 --- .../endpoints/class-wp-rest-settings-controller.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php index 474cd592fc..921360e3ee 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php @@ -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.