PluginProbe
Elementor Website Builder – more than just a page builder / 3.7.3
Elementor Website Builder – more than just a page builder v3.7.3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/managers/image.php +3 -10 4.0.73.7.3 View file →
@@ -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,14 +27,10 @@
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 - $items = Utils::get_super_global_value( $_POST, 'items' ) ?? []; // phpcs:ignore WordPress.Security.NonceVerification.Missing
32 + $items = $_POST['items']; // phpcs:ignore WordPress.Security.NonceVerification.Missing
38 33 $urls = [];
39 34
40 35 foreach ( $items as $item ) {
41 36 $urls[ $item['id'] ] = $this->get_details( $item['id'], $item['size'], $item['is_first_time'] );
@@ -80,11 +75,8 @@
80 75 foreach ( $sizes as $size ) {
81 76 if ( 0 === strpos( $size, 'custom_' ) ) {
82 77 preg_match( '/custom_(\d*)x(\d*)/', $size, $matches );
83 78
84 - $matches[1] = (int) $matches[1];
85 - $matches[2] = (int) $matches[2];
86 -
87 79 $instance = [
88 80 'image_size' => 'custom',
89 81 'image_custom_dimension' => [
90 82 'width' => $matches[1],
@@ -121,14 +113,15 @@
121 113 * Get Light-Box Image Attributes
122 114 *
123 115 * Used to retrieve an array of image attributes to be used for displaying an image in Elementor's Light Box module.
124 116 *
125 - * @param int $id The ID of the image.
117 + * @param int $id The ID of the image
126 118 *
127 119 * @return array An array of image attributes including `title` and `description`.
128 120 * @since 2.9.0
129 121 * @access public
130 122 */
123 +
131 124 public function get_lightbox_image_attributes( $id ) {
132 125 $attributes = [];
133 126 $kit = Plugin::$instance->kits_manager->get_active_kit();
134 127 $lightbox_title_src = $kit->get_settings( 'lightbox_title_src' );