| @@ -113,17 +113,11 @@ | ||
| 113 | 113 | $image_src = $image['url']; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | if ( ! empty( $image_src ) ) { |
| 117 | - $image_class_html = ! empty( $image_class ) ? ' class="' . esc_attr( $image_class ) . '"' : ''; | |
| 117 | + $image_class_html = ! empty( $image_class ) ? ' class="' . $image_class . '"' : ''; | |
| 118 | 118 | |
| 119 | - $html .= sprintf( | |
| 120 | - '<img src="%1$s" title="%2$s" alt="%3$s"%4$s loading="lazy" />', | |
| 121 | - esc_url( $image_src ), | |
| 122 | - esc_attr( Control_Media::get_image_title( $image ) ), | |
| 123 | - esc_attr( Control_Media::get_image_alt( $image ) ), | |
| 124 | - $image_class_html | |
| 125 | - ); | |
| 119 | + $html .= sprintf( '<img src="%s" title="%s" alt="%s"%s />', esc_attr( $image_src ), Control_Media::get_image_title( $image ), Control_Media::get_image_alt( $image ), $image_class_html ); | |
| 126 | 120 | } |
| 127 | 121 | } |
| 128 | 122 | |
| 129 | 123 | /** |
| @@ -292,19 +286,20 @@ | ||
| 292 | 286 | protected function init_fields() { |
| 293 | 287 | $fields = []; |
| 294 | 288 | |
| 295 | 289 | $fields['size'] = [ |
| 296 | - 'label' => esc_html__( 'Image Resolution', 'elementor' ), | |
| 290 | + 'label' => esc_html_x( 'Image Size', 'Image Size Control', 'elementor' ), | |
| 297 | 291 | 'type' => Controls_Manager::SELECT, |
| 298 | 292 | ]; |
| 299 | 293 | |
| 300 | 294 | $fields['custom_dimension'] = [ |
| 301 | - 'label' => esc_html__( 'Image Dimension', 'elementor' ), | |
| 295 | + 'label' => esc_html_x( 'Image Dimension', 'Image Size Control', 'elementor' ), | |
| 302 | 296 | 'type' => Controls_Manager::IMAGE_DIMENSIONS, |
| 303 | 297 | 'description' => esc_html__( 'You can crop the original image size to any custom size. You can also set a single value for height or width in order to keep the original size ratio.', 'elementor' ), |
| 304 | 298 | 'condition' => [ |
| 305 | 299 | 'size' => 'custom', |
| 306 | 300 | ], |
| 301 | + 'separator' => 'none', | |
| 307 | 302 | ]; |
| 308 | 303 | |
| 309 | 304 | return $fields; |
| 310 | 305 | } |
| @@ -376,12 +371,12 @@ | ||
| 376 | 371 | |
| 377 | 372 | $image_sizes[ $size_key ] = $control_title; |
| 378 | 373 | } |
| 379 | 374 | |
| 380 | - $image_sizes['full'] = esc_html__( 'Full', 'elementor' ); | |
| 375 | + $image_sizes['full'] = esc_html_x( 'Full', 'Image Size Control', 'elementor' ); | |
| 381 | 376 | |
| 382 | 377 | if ( ! empty( $args['include']['custom'] ) || ! in_array( 'custom', $args['exclude'] ) ) { |
| 383 | - $image_sizes['custom'] = esc_html__( 'Custom', 'elementor' ); | |
| 378 | + $image_sizes['custom'] = esc_html_x( 'Custom', 'Image Size Control', 'elementor' ); | |
| 384 | 379 | } |
| 385 | 380 | |
| 386 | 381 | return $image_sizes; |
| 387 | 382 | } |