LLMS_REST_Sections_Controller::register_routes()
Register routes.
Contents
Return Return
(void)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-sections-controller.php
* @since 1.0.0-beta.1 * * @return void */ public function register_routes() { parent::register_routes(); if ( isset( $this->content_controller ) ) { register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)/content', array( 'args' => array( 'id' => array( // translators: %1$s the post type name. 'description' => sprintf( __( 'Unique %1$s Identifier. The WordPress Post ID', 'lifterlms' ), $this->post_type ), 'type' => 'integer', ), ), array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_content_items' ), 'permission_callback' => array( $this->content_controller, 'get_items_permissions_check' ), 'args' => $this->content_controller->get_collection_params(), ), 'schema' => array( $this->content_controller, 'get_public_item_schema' ),
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |