WP-API auth starter

  1. function checkApiAuth( $result ){
  2. // Check if user is allowed to do stuff here
  3. if($user_checks_out) {
  4. $result = true;
  5. } else {
  6. $result = false;
  7. }
  8.  
  9. return $result;
  10. }
  11. add_filter('json_authentication_errors', 'checkApiAuth');
Scott Bolinger