PluginProbe
Elementor Website Builder – more than just a page builder / 3.26.2
Elementor Website Builder – more than just a page builder v3.26.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 +14 -24 4.0.73.26.2 View file →
@@ -184,10 +184,10 @@
184 184 [
185 185 'label' => esc_html__( 'Alignment', 'elementor' ),
186 186 'type' => Controls_Manager::CHOOSE,
187 187 'options' => [
188 - 'start' => [
189 - 'title' => esc_html__( 'Start', 'elementor' ),
188 + 'left' => [
189 + 'title' => esc_html__( 'Left', 'elementor' ),
190 190 'icon' => 'eicon-text-align-left',
191 191 ],
192 192 'center' => [
193 193 'title' => esc_html__( 'Center', 'elementor' ),
@@ -192,18 +192,13 @@
192 192 'center' => [
193 193 'title' => esc_html__( 'Center', 'elementor' ),
194 194 'icon' => 'eicon-text-align-center',
195 195 ],
196 - 'end' => [
197 - 'title' => esc_html__( 'End', 'elementor' ),
196 + 'right' => [
197 + 'title' => esc_html__( 'Right', 'elementor' ),
198 198 'icon' => 'eicon-text-align-right',
199 199 ],
200 200 ],
201 - 'classes' => 'elementor-control-start-end',
202 - 'selectors_dictionary' => [
203 - 'left' => is_rtl() ? 'end' : 'start',
204 - 'right' => is_rtl() ? 'start' : 'end',
205 - ],
206 201 'default' => 'center',
207 202 'selectors' => [
208 203 '{{WRAPPER}} .elementor-icon-wrapper' => 'text-align: {{VALUE}};',
209 204 ],
@@ -336,9 +331,9 @@
336 331 'condition' => [
337 332 'selected_icon[library]' => 'svg',
338 333 ],
339 334 'selectors' => [
340 - '{{WRAPPER}} .elementor-icon-wrapper svg' => 'width: auto;',
335 + '{{WRAPPER}} .elementor-icon-wrapper svg' => 'width: 100%;',
341 336 ],
342 337 ]
343 338 );
344 339
@@ -469,15 +464,15 @@
469 464 $is_new = empty( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
470 465
471 466 ?>
472 467 <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' ); ?>>
468 + <<?php Utils::print_unescaped_internal_string( $icon_tag . ' ' . $this->get_render_attribute_string( 'icon-wrapper' ) ); ?>>
474 469 <?php if ( $is_new || $migrated ) :
475 470 Icons_Manager::render_icon( $settings['selected_icon'], [ 'aria-hidden' => 'true' ] );
476 471 else : ?>
477 472 <i <?php $this->print_render_attribute_string( 'icon' ); ?>></i>
478 473 <?php endif; ?>
479 - </<?php Utils::print_validated_html_tag( $icon_tag ); ?>>
474 + </<?php Utils::print_unescaped_internal_string( $icon_tag ); ?>>
480 475 </div>
481 476 <?php
482 477 }
483 478
@@ -495,26 +490,21 @@
495 490 if ( '' === settings.selected_icon.value ) {
496 491 return;
497 492 }
498 493
499 - let iconTag = 'div';
494 + let link = '';
500 495
501 - if ( settings.link?.url ) {
502 - view.addRenderAttribute( 'link_url', 'href', elementor.helpers.sanitizeUrl( settings.link?.url ) );
503 - iconTag = 'a';
496 + if ( settings.link.url ) {
497 + view.addRenderAttribute( 'link_url', 'href', elementor.helpers.sanitizeUrl( settings.link.url ) );
498 + link = view.getRenderAttributeString( 'link_url' );
504 499 }
505 500
506 501 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 - }
502 + migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' ),
503 + iconTag = link ? 'a' : 'div';
514 504 #>
515 505 <div class="elementor-icon-wrapper">
516 - <{{{ iconTag }}} {{{ view.getRenderAttributeString( 'icon' ) }}} {{{ view.getRenderAttributeString( 'link_url' ) }}}>
506 + <{{{ iconTag }}} class="elementor-icon elementor-animation-{{ settings.hover_animation }}" {{{ link }}}>
517 507 <# if ( iconHTML && iconHTML.rendered && ( ! settings.icon || migrated ) ) { #>
518 508 {{{ iconHTML.value }}}
519 509 <# } else { #>
520 510 <i class="{{ settings.icon }}" aria-hidden="true"></i>