| @@ -23,8 +23,14 @@ | ||
| 23 | 23 | return [ 'POST' ]; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function POST( WP_REST_Request $request ) { |
| 27 | + $error = $this->verify_capability(); | |
| 28 | + | |
| 29 | + if ( $error ) { | |
| 30 | + return $error; | |
| 31 | + } | |
| 32 | + | |
| 27 | 33 | try { |
| 28 | 34 | $body = json_decode( $request->get_body() ); |
| 29 | 35 | $image_ids = $body->image_ids ?? null; |
| 30 | 36 | |