| @@ -1,8 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor; |
| 3 | 3 | |
| 4 | -use Elementor\Core\Editor\Editor; | |
| 5 | 4 | use Elementor\Core\Utils\Collection; |
| 6 | 5 | |
| 7 | 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | 7 | exit; // Exit if accessed directly. |
| @@ -28,12 +27,8 @@ | ||
| 28 | 27 | * @since 1.0.0 |
| 29 | 28 | * @access public |
| 30 | 29 | */ |
| 31 | 30 | public function get_images_details() { |
| 32 | - if ( ! current_user_can( 'publish_posts' ) ) { | |
| 33 | - wp_send_json_error( 'Permission denied' ); | |
| 34 | - } | |
| 35 | - | |
| 36 | 31 | // PHPCS - Already validated by wp_ajax. |
| 37 | 32 | $items = Utils::get_super_global_value( $_POST, 'items' ) ?? []; // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 38 | 33 | $urls = []; |
| 39 | 34 | |
| @@ -121,14 +116,15 @@ | ||
| 121 | 116 | * Get Light-Box Image Attributes |
| 122 | 117 | * |
| 123 | 118 | * Used to retrieve an array of image attributes to be used for displaying an image in Elementor's Light Box module. |
| 124 | 119 | * |
| 125 | - * @param int $id The ID of the image. | |
| 120 | + * @param int $id The ID of the image | |
| 126 | 121 | * |
| 127 | 122 | * @return array An array of image attributes including `title` and `description`. |
| 128 | 123 | * @since 2.9.0 |
| 129 | 124 | * @access public |
| 130 | 125 | */ |
| 126 | + | |
| 131 | 127 | public function get_lightbox_image_attributes( $id ) { |
| 132 | 128 | $attributes = []; |
| 133 | 129 | $kit = Plugin::$instance->kits_manager->get_active_kit(); |
| 134 | 130 | $lightbox_title_src = $kit->get_settings( 'lightbox_title_src' ); |