Advertisement
shelob9

Untitled

Jul 24th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. namespace josh\api\routes;
  2.  
  3.  
  4. abstract class public_route extends crud {
  5.  
  6. /**
  7. * @inheritdoc
  8. */
  9. public function get_items_permissions_check( \WP_REST_Request $request ){
  10. return true;
  11. }
  12.  
  13. /**
  14. * @inheritdoc
  15. */
  16. public function create_item_permissions_check( \WP_REST_Request $request ){
  17. return current_user_can( 'manage_options' );
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement