| @@ -24,8 +24,14 @@ | ||
| 24 | 24 | return [ 'GET' ]; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function GET( WP_REST_Request $request ) { |
| 28 | + $error = $this->verify_capability(); | |
| 29 | + | |
| 30 | + if ( $error ) { | |
| 31 | + return $error; | |
| 32 | + } | |
| 33 | + | |
| 28 | 34 | try { |
| 29 | 35 | $image_id = $request->get_param( 'image_id' ); |
| 30 | 36 | |
| 31 | 37 | if ( empty( $image_id ) ) { |