| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | * @since 1.0.0 |
| 29 | 29 | * @access public |
| 30 | 30 | */ |
| 31 | 31 | public function get_images_details() { |
| 32 | - if ( ! current_user_can( 'publish_posts' ) ) { | |
| 32 | + if ( ! current_user_can( Editor::EDITING_CAPABILITY ) ) { | |
| 33 | 33 | wp_send_json_error( 'Permission denied' ); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // PHPCS - Already validated by wp_ajax. |
| @@ -121,14 +121,15 @@ | ||
| 121 | 121 | * Get Light-Box Image Attributes |
| 122 | 122 | * |
| 123 | 123 | * Used to retrieve an array of image attributes to be used for displaying an image in Elementor's Light Box module. |
| 124 | 124 | * |
| 125 | - * @param int $id The ID of the image. | |
| 125 | + * @param int $id The ID of the image | |
| 126 | 126 | * |
| 127 | 127 | * @return array An array of image attributes including `title` and `description`. |
| 128 | 128 | * @since 2.9.0 |
| 129 | 129 | * @access public |
| 130 | 130 | */ |
| 131 | + | |
| 131 | 132 | public function get_lightbox_image_attributes( $id ) { |
| 132 | 133 | $attributes = []; |
| 133 | 134 | $kit = Plugin::$instance->kits_manager->get_active_kit(); |
| 134 | 135 | $lightbox_title_src = $kit->get_settings( 'lightbox_title_src' ); |