routeId($request, 'post_id'); if (!current_user_can('edit_post', $postId)) { return $this->sendError(__('Forbidden.', 'publishdeck'), 403, 'rest_forbidden'); } $post = get_post($postId); if (!$post || $post->post_type !== 'fspd_post') { return $this->sendError(__('Post not found.', 'publishdeck'), 404, 'fspd_not_found'); } $sites = (new ValidationReporter())->forPost($postId, $post); return $this->sendSuccess([ 'post_id' => $postId, 'sites' => $sites, ]); } }