LLMS_REST_Students_Progress_Controller::register_routes()
Register routes.
Contents
Return Return
(void)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-students-progress-controller.php
* * @since 1.0.0-beta.1 * * @return void */ public function register_routes() { register_rest_route( $this->namespace, '/' . $this->rest_base, array( 'args' => array( 'id' => array( 'description' => __( 'Unique identifier for the student. The WP User ID.', 'lifterlms' ), 'type' => 'integer', ), 'post_id' => array( 'description' => __( 'Unique course, lesson, or section Identifer. The WordPress Post ID.', 'lifterlms' ), 'type' => 'integer', 'validate_callback' => array( $this, 'validate_post_id' ), ), ), array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_item' ), 'permission_callback' => array( $this, 'get_item_permissions_check' ), 'args' => $this->get_get_item_params(), ), array( 'methods' => 'POST', 'callback' => array( $this, 'update_item' ), 'permission_callback' => array( $this, 'update_item_permissions_check' ), 'args' => $this->get_endpoint_args_for_item_schema( 'POST' ), ), array( 'methods' => WP_REST_Server::DELETABLE, 'callback' => array( $this, 'delete_item' ), 'permission_callback' => array( $this, 'delete_item_permissions_check' ), 'args' => array(), ),
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |