Make WordPress Core

Changeset 38954


Ignore:
Timestamp:
10/26/2016 01:44:37 PM (8 years ago)
Author:
rachelbaker
Message:

REST API: Add constructor to the WP_REST_Settings_Controller class.

Provides consistency with the other API endpoint controller classes.

Props Soean.
Fixes #38429.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php

    r38832 r38954  
    44 * Manage a WordPress site's settings.
    55 */
    6 
    76class WP_REST_Settings_Controller extends WP_REST_Controller {
    87
    9     protected $rest_base = 'settings';
    10     protected $namespace = 'wp/v2';
     8    /**
     9     * Constructor.
     10     *
     11     * @since 4.7.0
     12     * @access public
     13     */
     14    public function __construct() {
     15        $this->namespace = 'wp/v2';
     16        $this->rest_base = 'settings';
     17    }
    1118
    1219    /**
Note: See TracChangeset for help on using the changeset viewer.