| @@ -47,9 +47,10 @@ | ||
| 47 | 47 | $params = $request->get_body(); |
| 48 | 48 | $params = json_decode( $params ); |
| 49 | 49 | $params->ids = implode( ',', $params->ids ); |
| 50 | 50 | $atts = (array) $params; |
| 51 | - return $this->core->gallery( $atts, true ); | |
| 51 | + $html = $this->core->gallery( $atts, true ); | |
| 52 | + return new WP_REST_Response( [ 'success' => true, 'data' => $html ], 200 ); | |
| 52 | 53 | } |
| 53 | 54 | |
| 54 | 55 | function rest_all_settings() { |
| 55 | 56 | return new WP_REST_Response( [ 'success' => true, 'data' => $this->get_all_options() ], 200 ); |