| @@ -5,9 +5,9 @@ | ||
| 5 | 5 | use Elementor\Data\V2\Manager; |
| 6 | 6 | use WP_REST_Controller; |
| 7 | 7 | |
| 8 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | - exit; // Exit if accessed directly. | |
| 9 | + exit; // Exit if accessed directly | |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * TODO: Utilize 'WP_REST_Controller' as much as possible. |
| @@ -196,10 +196,8 @@ | ||
| 196 | 196 | * |
| 197 | 197 | * @param \WP_REST_Request $request |
| 198 | 198 | * |
| 199 | 199 | * @return bool |
| 200 | - * | |
| 201 | - * @throws WP_Error_Exception If API request validation fails, permissions are insufficient, or processing errors occur. | |
| 202 | 200 | */ |
| 203 | 201 | public function get_permission_callback( $request ) { |
| 204 | 202 | $is_multi = (bool) $request->get_param( 'is_multi' ); |
| 205 | 203 | |
| @@ -225,9 +223,9 @@ | ||
| 225 | 223 | break; |
| 226 | 224 | } |
| 227 | 225 | |
| 228 | 226 | if ( $result instanceof \WP_Error ) { |
| 229 | - throw new WP_Error_Exception( esc_html( $result ) ); | |
| 227 | + throw new WP_Error_Exception( $result ); | |
| 230 | 228 | } |
| 231 | 229 | |
| 232 | 230 | return $result; |
| 233 | 231 | } |
| @@ -233,8 +231,9 @@ | ||
| 233 | 231 | } |
| 234 | 232 | |
| 235 | 233 | /** |
| 236 | 234 | * Checks if a given request has access to create items. |
| 235 | + ** | |
| 237 | 236 | * |
| 238 | 237 | * @param \WP_REST_Request $request Full details about the request. |
| 239 | 238 | * |
| 240 | 239 | * @return true|\WP_Error True if the request has access to create items, WP_Error object otherwise. |