| @@ -110,12 +110,8 @@ | ||
| 110 | 110 | 'upgrade_text' => esc_html__( 'Upgrade Now', 'elementor' ), |
| 111 | 111 | ]; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - public function has_widget_inner_wrapper(): bool { | |
| 115 | - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ); | |
| 116 | - } | |
| 117 | - | |
| 118 | 114 | /** |
| 119 | 115 | * Register image gallery widget controls. |
| 120 | 116 | * |
| 121 | 117 | * Adds different input fields to allow the user to change and customize the widget settings. |
| @@ -213,48 +209,8 @@ | ||
| 213 | 209 | ], |
| 214 | 210 | 'condition' => [ |
| 215 | 211 | 'gallery_link' => 'file', |
| 216 | 212 | ], |
| 217 | - 'assets' => [ | |
| 218 | - 'styles' => [ | |
| 219 | - [ | |
| 220 | - 'name' => 'e-swiper', | |
| 221 | - 'conditions' => [ | |
| 222 | - 'terms' => [ | |
| 223 | - [ | |
| 224 | - 'name' => 'gallery_link', | |
| 225 | - 'operator' => '===', | |
| 226 | - 'value' => 'file', | |
| 227 | - ], | |
| 228 | - [ | |
| 229 | - 'name' => 'open_lightbox', | |
| 230 | - 'operator' => '!==', | |
| 231 | - 'value' => 'no', | |
| 232 | - ], | |
| 233 | - ], | |
| 234 | - ], | |
| 235 | - ], | |
| 236 | - ], | |
| 237 | - 'scripts' => [ | |
| 238 | - [ | |
| 239 | - 'name' => 'swiper', | |
| 240 | - 'conditions' => [ | |
| 241 | - 'terms' => [ | |
| 242 | - [ | |
| 243 | - 'name' => 'gallery_link', | |
| 244 | - 'operator' => '===', | |
| 245 | - 'value' => 'file', | |
| 246 | - ], | |
| 247 | - [ | |
| 248 | - 'name' => 'open_lightbox', | |
| 249 | - 'operator' => '!==', | |
| 250 | - 'value' => 'no', | |
| 251 | - ], | |
| 252 | - ], | |
| 253 | - ], | |
| 254 | - ], | |
| 255 | - ], | |
| 256 | - ], | |
| 257 | 213 | ] |
| 258 | 214 | ); |
| 259 | 215 | |
| 260 | 216 | $this->add_control( |
| @@ -282,9 +238,9 @@ | ||
| 282 | 238 | |
| 283 | 239 | $this->add_control( |
| 284 | 240 | 'image_spacing', |
| 285 | 241 | [ |
| 286 | - 'label' => esc_html__( 'Gap', 'elementor' ), | |
| 242 | + 'label' => esc_html__( 'Spacing', 'elementor' ), | |
| 287 | 243 | 'type' => Controls_Manager::SELECT, |
| 288 | 244 | 'options' => [ |
| 289 | 245 | '' => esc_html__( 'Default', 'elementor' ), |
| 290 | 246 | 'custom' => esc_html__( 'Custom', 'elementor' ), |
| @@ -299,9 +255,9 @@ | ||
| 299 | 255 | |
| 300 | 256 | $this->add_control( |
| 301 | 257 | 'image_spacing_custom', |
| 302 | 258 | [ |
| 303 | - 'label' => esc_html__( 'Custom Gap', 'elementor' ), | |
| 259 | + 'label' => esc_html__( 'Custom Spacing', 'elementor' ), | |
| 304 | 260 | 'type' => Controls_Manager::SLIDER, |
| 305 | 261 | 'size_units' => [ 'px', 'em', 'rem', 'custom' ], |
| 306 | 262 | 'range' => [ |
| 307 | 263 | 'px' => [ |
| @@ -366,10 +322,10 @@ | ||
| 366 | 322 | [ |
| 367 | 323 | 'label' => esc_html__( 'Alignment', 'elementor' ), |
| 368 | 324 | 'type' => Controls_Manager::CHOOSE, |
| 369 | 325 | 'options' => [ |
| 370 | - 'start' => [ | |
| 371 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 326 | + 'left' => [ | |
| 327 | + 'title' => esc_html__( 'Left', 'elementor' ), | |
| 372 | 328 | 'icon' => 'eicon-text-align-left', |
| 373 | 329 | ], |
| 374 | 330 | 'center' => [ |
| 375 | 331 | 'title' => esc_html__( 'Center', 'elementor' ), |
| @@ -374,10 +330,10 @@ | ||
| 374 | 330 | 'center' => [ |
| 375 | 331 | 'title' => esc_html__( 'Center', 'elementor' ), |
| 376 | 332 | 'icon' => 'eicon-text-align-center', |
| 377 | 333 | ], |
| 378 | - 'end' => [ | |
| 379 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 334 | + 'right' => [ | |
| 335 | + 'title' => esc_html__( 'Right', 'elementor' ), | |
| 380 | 336 | 'icon' => 'eicon-text-align-right', |
| 381 | 337 | ], |
| 382 | 338 | 'justify' => [ |
| 383 | 339 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| @@ -383,13 +339,8 @@ | ||
| 383 | 339 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| 384 | 340 | 'icon' => 'eicon-text-align-justify', |
| 385 | 341 | ], |
| 386 | 342 | ], |
| 387 | - 'classes' => 'elementor-control-start-end', | |
| 388 | - 'selectors_dictionary' => [ | |
| 389 | - 'left' => is_rtl() ? 'end' : 'start', | |
| 390 | - 'right' => is_rtl() ? 'start' : 'end', | |
| 391 | - ], | |
| 392 | 343 | 'default' => 'center', |
| 393 | 344 | 'selectors' => [ |
| 394 | 345 | '{{WRAPPER}} .gallery-item .gallery-caption' => 'text-align: {{VALUE}};', |
| 395 | 346 | ], |
| @@ -498,26 +449,6 @@ | ||
| 498 | 449 | remove_filter( 'wp_get_attachment_link', [ $this, 'add_lightbox_data_to_image_link' ] ); |
| 499 | 450 | ?> |
| 500 | 451 | </div> |
| 501 | 452 | <?php |
| 502 | - } | |
| 503 | - | |
| 504 | - public function render_markdown(): string { | |
| 505 | - $settings = $this->get_settings_for_display(); | |
| 506 | - if ( empty( $settings['wp_gallery'] ) ) { | |
| 507 | - return ''; | |
| 508 | - } | |
| 509 | - $images = []; | |
| 510 | - foreach ( $settings['wp_gallery'] as $image ) { | |
| 511 | - $url = $image['url'] ?? ''; | |
| 512 | - if ( empty( $url ) ) { | |
| 513 | - continue; | |
| 514 | - } | |
| 515 | - $alt = ''; | |
| 516 | - if ( ! empty( $image['id'] ) ) { | |
| 517 | - $alt = get_post_meta( $image['id'], '_wp_attachment_image_alt', true ); | |
| 518 | - } | |
| 519 | - $images[] = ' . ')'; | |
| 520 | - } | |
| 521 | - return implode( "\n\n", $images ); | |
| 522 | 453 | } |
| 523 | 454 | } |