Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace josh\api\routes;
- abstract class public_route extends crud {
- /**
- * @inheritdoc
- */
- public function get_items_permissions_check( \WP_REST_Request $request ){
- return true;
- }
- /**
- * @inheritdoc
- */
- public function create_item_permissions_check( \WP_REST_Request $request ){
- return current_user_can( 'manage_options' );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement