LLMS_REST_Memberships_Controller::register_routes()
Register routes.
Contents
Return Return
(void)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-memberships-controller.php
public function register_routes() {
parent::register_routes();
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<id>[\d]+)/enrollments',
array(
'args' => array(
'id' => array(
'description' => __( 'Unique Membership Identifier. The WordPress Post ID', 'lifterlms' ),
'type' => 'integer',
),
),
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this->enrollments_controller, 'get_items' ),
'permission_callback' => array( $this->enrollments_controller, 'get_items_permissions_check' ),
'args' => $this->enrollments_controller->get_collection_params(),
),
'schema' => array( $this->enrollments_controller, 'get_public_item_schema' ),
)
);
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.9 | Introduced. |