PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.2
Elementor Website Builder – more than just a page builder v3.25.2
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/widgets/icon.php +12 -36 4.2.23.25.2 View file →
@@ -73,12 +73,8 @@
73 73 public function get_categories() {
74 74 return [ 'basic' ];
75 75 }
76 76
77 - public function has_widget_inner_wrapper(): bool {
78 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
79 - }
80 -
81 77 /**
82 78 * Get widget keywords.
83 79 *
84 80 * Retrieve the list of keywords the widget belongs to.
@@ -184,10 +180,10 @@
184 180 [
185 181 'label' => esc_html__( 'Alignment', 'elementor' ),
186 182 'type' => Controls_Manager::CHOOSE,
187 183 'options' => [
188 - 'start' => [
189 - 'title' => esc_html__( 'Start', 'elementor' ),
184 + 'left' => [
185 + 'title' => esc_html__( 'Left', 'elementor' ),
190 186 'icon' => 'eicon-text-align-left',
191 187 ],
192 188 'center' => [
193 189 'title' => esc_html__( 'Center', 'elementor' ),
@@ -192,18 +188,13 @@
192 188 'center' => [
193 189 'title' => esc_html__( 'Center', 'elementor' ),
194 190 'icon' => 'eicon-text-align-center',
195 191 ],
196 - 'end' => [
197 - 'title' => esc_html__( 'End', 'elementor' ),
192 + 'right' => [
193 + 'title' => esc_html__( 'Right', 'elementor' ),
198 194 'icon' => 'eicon-text-align-right',
199 195 ],
200 196 ],
201 - 'classes' => 'elementor-control-start-end',
202 - 'selectors_dictionary' => [
203 - 'left' => is_rtl() ? 'end' : 'start',
204 - 'right' => is_rtl() ? 'start' : 'end',
205 - ],
206 197 'default' => 'center',
207 198 'selectors' => [
208 199 '{{WRAPPER}} .elementor-icon-wrapper' => 'text-align: {{VALUE}};',
209 200 ],
@@ -336,9 +327,9 @@
336 327 'condition' => [
337 328 'selected_icon[library]' => 'svg',
338 329 ],
339 330 'selectors' => [
340 - '{{WRAPPER}} .elementor-icon-wrapper svg' => 'width: auto;',
331 + '{{WRAPPER}} .elementor-icon-wrapper svg' => 'width: 100%;',
341 332 ],
342 333 ]
343 334 );
344 335
@@ -469,15 +460,15 @@
469 460 $is_new = empty( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
470 461
471 462 ?>
472 463 <div <?php $this->print_render_attribute_string( 'wrapper' ); ?>>
473 - <<?php Utils::print_validated_html_tag( $icon_tag ); ?> <?php $this->print_render_attribute_string( 'icon-wrapper' ); ?>>
464 + <<?php Utils::print_unescaped_internal_string( $icon_tag . ' ' . $this->get_render_attribute_string( 'icon-wrapper' ) ); ?>>
474 465 <?php if ( $is_new || $migrated ) :
475 466 Icons_Manager::render_icon( $settings['selected_icon'], [ 'aria-hidden' => 'true' ] );
476 467 else : ?>
477 468 <i <?php $this->print_render_attribute_string( 'icon' ); ?>></i>
478 469 <?php endif; ?>
479 - </<?php Utils::print_validated_html_tag( $icon_tag ); ?>>
470 + </<?php Utils::print_unescaped_internal_string( $icon_tag ); ?>>
480 471 </div>
481 472 <?php
482 473 }
483 474
@@ -495,26 +486,15 @@
495 486 if ( '' === settings.selected_icon.value ) {
496 487 return;
497 488 }
498 489
499 - let iconTag = 'div';
500 -
501 - if ( settings.link?.url ) {
502 - view.addRenderAttribute( 'link_url', 'href', elementor.helpers.sanitizeUrl( settings.link?.url ) );
503 - iconTag = 'a';
504 - }
505 -
506 - const iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ),
507 - migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' );
508 -
509 - view.addRenderAttribute( 'icon', 'class', 'elementor-icon' );
510 -
511 - if ( '' !== settings.hover_animation ) {
512 - view.addRenderAttribute( 'icon', 'class', 'elementor-animation-' + settings.hover_animation );
513 - }
490 + const link = settings.link.url ? 'href="' + elementor.helpers.sanitizeUrl( settings.link.url ) + '"' : '',
491 + iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ),
492 + migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' ),
493 + iconTag = link ? 'a' : 'div';
514 494 #>
515 495 <div class="elementor-icon-wrapper">
516 - <{{{ iconTag }}} {{{ view.getRenderAttributeString( 'icon' ) }}} {{{ view.getRenderAttributeString( 'link_url' ) }}}>
496 + <{{{ iconTag }}} class="elementor-icon elementor-animation-{{ settings.hover_animation }}" {{{ link }}}>
517 497 <# if ( iconHTML && iconHTML.rendered && ( ! settings.icon || migrated ) ) { #>
518 498 {{{ iconHTML.value }}}
519 499 <# } else { #>
520 500 <i class="{{ settings.icon }}" aria-hidden="true"></i>
@@ -521,10 +501,6 @@
521 501 <# } #>
522 502 </{{{ iconTag }}}>
523 503 </div>
524 504 <?php
525 - }
526 -
527 - public function render_markdown(): string {
528 - return '';
529 505 }
530 506 }