class-ld-rest-users-controller.php
1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* LearnDash REST API V1 Users Controller.
*
* @since 2.5.8
* @package LearnDash\REST\V1
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ( ! class_exists( 'LD_REST_Users_Controller_V1' ) ) && ( class_exists( 'WP_REST_Users_Controller' ) ) ) {
/**
* Class LearnDash REST API V1 Users Controller.
*
* @since 2.5.8
*/
class LD_REST_Users_Controller_V1 extends WP_REST_Users_Controller /* phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound */ {
/**
* Version
*
* @var string
*/
protected $version = 'v1';
/**
* Sub controllers
*
* @var array
*/
protected $sub_controllers = array();
/**
* Taxonomies
*
* @var array
*/
protected $taxonomies = array();
/**
* Public constructor for class
*
* @since 2.5.8
*/
public function __construct() {
parent::__construct();
$this->namespace = LEARNDASH_REST_API_NAMESPACE . '/' . $this->version;
$this->rest_base = LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Section_General_REST_API', 'users' );
}
/**
* Registers the routes for the objects of the controller.
*
* @since 2.5.8
*
* @see register_rest_route() in WordPress core.
*/
public function register_routes() {
$collection_params = $this->get_collection_params();
$schema = $this->get_item_schema();
$get_item_args = array(
'context' => $this->get_context_param( array( 'default' => 'view' ) ),
);
}
}
}