PluginProbe
Elementor Website Builder – more than just a page builder / 3.22.2
Elementor Website Builder – more than just a page builder v3.22.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 +13 -38 4.2.23.22.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.
@@ -145,11 +141,10 @@
145 141 [
146 142 'label' => esc_html__( 'Shape', 'elementor' ),
147 143 'type' => Controls_Manager::SELECT,
148 144 'options' => [
145 + 'circle' => esc_html__( 'Circle', 'elementor' ),
149 146 'square' => esc_html__( 'Square', 'elementor' ),
150 - 'rounded' => esc_html__( 'Rounded', 'elementor' ),
151 - 'circle' => esc_html__( 'Circle', 'elementor' ),
152 147 ],
153 148 'default' => 'circle',
154 149 'condition' => [
155 150 'view!' => 'default',
@@ -184,10 +179,10 @@
184 179 [
185 180 'label' => esc_html__( 'Alignment', 'elementor' ),
186 181 'type' => Controls_Manager::CHOOSE,
187 182 'options' => [
188 - 'start' => [
189 - 'title' => esc_html__( 'Start', 'elementor' ),
183 + 'left' => [
184 + 'title' => esc_html__( 'Left', 'elementor' ),
190 185 'icon' => 'eicon-text-align-left',
191 186 ],
192 187 'center' => [
193 188 'title' => esc_html__( 'Center', 'elementor' ),
@@ -192,18 +187,13 @@
192 187 'center' => [
193 188 'title' => esc_html__( 'Center', 'elementor' ),
194 189 'icon' => 'eicon-text-align-center',
195 190 ],
196 - 'end' => [
197 - 'title' => esc_html__( 'End', 'elementor' ),
191 + 'right' => [
192 + 'title' => esc_html__( 'Right', 'elementor' ),
198 193 'icon' => 'eicon-text-align-right',
199 194 ],
200 195 ],
201 - 'classes' => 'elementor-control-start-end',
202 - 'selectors_dictionary' => [
203 - 'left' => is_rtl() ? 'end' : 'start',
204 - 'right' => is_rtl() ? 'start' : 'end',
205 - ],
206 196 'default' => 'center',
207 197 'selectors' => [
208 198 '{{WRAPPER}} .elementor-icon-wrapper' => 'text-align: {{VALUE}};',
209 199 ],
@@ -336,9 +326,9 @@
336 326 'condition' => [
337 327 'selected_icon[library]' => 'svg',
338 328 ],
339 329 'selectors' => [
340 - '{{WRAPPER}} .elementor-icon-wrapper svg' => 'width: auto;',
330 + '{{WRAPPER}} .elementor-icon-wrapper svg' => 'width: 100%;',
341 331 ],
342 332 ]
343 333 );
344 334
@@ -469,15 +459,15 @@
469 459 $is_new = empty( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
470 460
471 461 ?>
472 462 <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' ); ?>>
463 + <<?php Utils::print_unescaped_internal_string( $icon_tag . ' ' . $this->get_render_attribute_string( 'icon-wrapper' ) ); ?>>
474 464 <?php if ( $is_new || $migrated ) :
475 465 Icons_Manager::render_icon( $settings['selected_icon'], [ 'aria-hidden' => 'true' ] );
476 466 else : ?>
477 467 <i <?php $this->print_render_attribute_string( 'icon' ); ?>></i>
478 468 <?php endif; ?>
479 - </<?php Utils::print_validated_html_tag( $icon_tag ); ?>>
469 + </<?php Utils::print_unescaped_internal_string( $icon_tag ); ?>>
480 470 </div>
481 471 <?php
482 472 }
483 473
@@ -495,26 +485,15 @@
495 485 if ( '' === settings.selected_icon.value ) {
496 486 return;
497 487 }
498 488
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 - }
489 + const link = settings.link.url ? 'href="' + _.escape( settings.link.url ) + '"' : '',
490 + iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ),
491 + migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' ),
492 + iconTag = link ? 'a' : 'div';
514 493 #>
515 494 <div class="elementor-icon-wrapper">
516 - <{{{ iconTag }}} {{{ view.getRenderAttributeString( 'icon' ) }}} {{{ view.getRenderAttributeString( 'link_url' ) }}}>
495 + <{{{ iconTag }}} class="elementor-icon elementor-animation-{{ settings.hover_animation }}" {{{ link }}}>
517 496 <# if ( iconHTML && iconHTML.rendered && ( ! settings.icon || migrated ) ) { #>
518 497 {{{ iconHTML.value }}}
519 498 <# } else { #>
520 499 <i class="{{ settings.icon }}" aria-hidden="true"></i>
@@ -521,10 +500,6 @@
521 500 <# } #>
522 501 </{{{ iconTag }}}>
523 502 </div>
524 503 <?php
525 - }
526 -
527 - public function render_markdown(): string {
528 - return '';
529 504 }
530 505 }