Inventory_Presser_REST::add_routes()
Adds /invp/v1/settings & /invp/v1/feed-complete routes.
Return Return
(void)
Source Source
File: includes/class-rest.php
public function add_routes() { register_rest_route( 'invp/v1', '/settings/', array( 'methods' => 'GET', 'callback' => array( $this, 'response_settings' ), 'permission_callback' => '__return_true', ) ); register_rest_route( 'invp/v1', '/feed-complete/', array( 'methods' => 'PUT', 'callback' => array( $this, 'response_feed_complete' ), 'permission_callback' => function () { return current_user_can( 'edit_posts' ); }, ) ); }
Expand full source codeCollapse full source codeView on Github