PluginProbe
Elementor Website Builder – more than just a page builder / 3.13.3
Elementor Website Builder – more than just a page builder v3.13.3
4.3.0-beta3 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 All 452 releases
← All changes | includes/widgets/icon-list.php +23 -73 4.1.0-dev23.13.3 View file →
@@ -72,31 +72,9 @@
72 72 public function get_keywords() {
73 73 return [ 'icon list', 'icon', 'list' ];
74 74 }
75 75
76 - protected function is_dynamic_content(): bool {
77 - return false;
78 - }
79 -
80 - public function has_widget_inner_wrapper(): bool {
81 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
82 - }
83 -
84 76 /**
85 - * Get style dependencies.
86 - *
87 - * Retrieve the list of style dependencies the widget requires.
88 - *
89 - * @since 3.24.0
90 - * @access public
91 - *
92 - * @return array Widget style dependencies.
93 - */
94 - public function get_style_depends(): array {
95 - return [ 'widget-icon-list' ];
96 - }
97 -
98 - /**
99 77 * Register icon list widget controls.
100 78 *
101 79 * Adds different input fields to allow the user to change and customize the widget settings.
102 80 *
@@ -170,8 +148,9 @@
170 148 'type' => Controls_Manager::URL,
171 149 'dynamic' => [
172 150 'active' => true,
173 151 ],
152 + 'placeholder' => esc_html__( 'https://your-link.com', 'elementor' ),
174 153 ]
175 154 );
176 155
177 156 $this->add_control(
@@ -243,13 +222,14 @@
243 222 'max' => 50,
244 223 ],
245 224 ],
246 225 'selectors' => [
247 - '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child)' => 'padding-block-end: calc({{SIZE}}{{UNIT}}/2)',
248 - '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:first-child)' => 'margin-block-start: calc({{SIZE}}{{UNIT}}/2)',
249 - '{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item' => 'margin-inline: calc({{SIZE}}{{UNIT}}/2)',
250 - '{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items' => 'margin-inline: calc(-{{SIZE}}{{UNIT}}/2)',
251 - '{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:after' => 'inset-inline-end: calc(-{{SIZE}}{{UNIT}}/2)',
226 + '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child)' => 'padding-bottom: calc({{SIZE}}{{UNIT}}/2)',
227 + '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:first-child)' => 'margin-top: calc({{SIZE}}{{UNIT}}/2)',
228 + '{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item' => 'margin-right: calc({{SIZE}}{{UNIT}}/2); margin-left: calc({{SIZE}}{{UNIT}}/2)',
229 + '{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items' => 'margin-right: calc(-{{SIZE}}{{UNIT}}/2); margin-left: calc(-{{SIZE}}{{UNIT}}/2)',
230 + 'body.rtl {{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:after' => 'left: calc(-{{SIZE}}{{UNIT}}/2)',
231 + 'body:not(.rtl) {{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:after' => 'right: calc(-{{SIZE}}{{UNIT}}/2)',
252 232 ],
253 233 ]
254 234 );
255 235
@@ -258,10 +238,10 @@
258 238 [
259 239 'label' => esc_html__( 'Alignment', 'elementor' ),
260 240 'type' => Controls_Manager::CHOOSE,
261 241 'options' => [
262 - 'start' => [
263 - 'title' => esc_html__( 'Start', 'elementor' ),
242 + 'left' => [
243 + 'title' => esc_html__( 'Left', 'elementor' ),
264 244 'icon' => 'eicon-h-align-left',
265 245 ],
266 246 'center' => [
267 247 'title' => esc_html__( 'Center', 'elementor' ),
@@ -266,19 +246,14 @@
266 246 'center' => [
267 247 'title' => esc_html__( 'Center', 'elementor' ),
268 248 'icon' => 'eicon-h-align-center',
269 249 ],
270 - 'end' => [
271 - 'title' => esc_html__( 'End', 'elementor' ),
250 + 'right' => [
251 + 'title' => esc_html__( 'Right', 'elementor' ),
272 252 'icon' => 'eicon-h-align-right',
273 253 ],
274 254 ],
275 - 'classes_dictionary' => [
276 - 'left' => is_rtl() ? 'end' : 'start',
277 - 'right' => is_rtl() ? 'start' : 'end',
278 - ],
279 255 'prefix_class' => 'elementor%s-align-',
280 - 'classes' => 'elementor-control-start-end',
281 256 ]
282 257 );
283 258
284 259 $this->add_control(
@@ -310,10 +285,10 @@
310 285 'condition' => [
311 286 'divider' => 'yes',
312 287 ],
313 288 'selectors' => [
314 - '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child):after' => 'border-block-start-style: {{VALUE}}',
315 - '{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'border-inline-start-style: {{VALUE}}',
289 + '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child):after' => 'border-top-style: {{VALUE}}',
290 + '{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'border-left-style: {{VALUE}}',
316 291 ],
317 292 ]
318 293 );
319 294
@@ -335,10 +310,10 @@
335 310 'condition' => [
336 311 'divider' => 'yes',
337 312 ],
338 313 'selectors' => [
339 - '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child):after' => 'border-block-start-width: {{SIZE}}{{UNIT}}',
340 - '{{WRAPPER}} .elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'border-inline-start-width: {{SIZE}}{{UNIT}}',
314 + '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child):after' => 'border-top-width: {{SIZE}}{{UNIT}}',
315 + '{{WRAPPER}} .elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'border-left-width: {{SIZE}}{{UNIT}}',
341 316 ],
342 317 ]
343 318 );
344 319
@@ -471,9 +446,9 @@
471 446
472 447 $this->add_control(
473 448 'icon_color_hover_transition',
474 449 [
475 - 'label' => esc_html__( 'Transition Duration', 'elementor' ),
450 + 'label' => __( 'Transition Duration', 'elementor' ),
476 451 'type' => Controls_Manager::SLIDER,
477 452 'size_units' => [ 's', 'ms', 'custom' ],
478 453 'default' => [
479 454 'unit' => 's',
@@ -529,9 +504,9 @@
529 504 ],
530 505 ],
531 506 'separator' => 'after',
532 507 'selectors' => [
533 - '{{WRAPPER}} .elementor-icon-list-icon' => 'padding-inline-end: {{SIZE}}{{UNIT}};',
508 + '{{WRAPPER}} .elementor-icon-list-icon' => is_rtl() ? 'padding-left: {{SIZE}}{{UNIT}};' : 'padding-right: {{SIZE}}{{UNIT}};',
534 509 ],
535 510 ]
536 511 );
537 512
@@ -613,8 +588,9 @@
613 588 ],
614 589 'em' => [
615 590 'min' => -1,
616 591 'max' => 1,
592 + 'step' => 0.1,
617 593 ],
618 594 ],
619 595 'selectors' => [
620 596 '{{WRAPPER}}' => '--icon-vertical-offset: {{SIZE}}{{UNIT}};',
@@ -698,9 +674,9 @@
698 674
699 675 $this->add_control(
700 676 'text_color_hover_transition',
701 677 [
702 - 'label' => esc_html__( 'Transition Duration', 'elementor' ),
678 + 'label' => __( 'Transition Duration', 'elementor' ),
703 679 'type' => Controls_Manager::SLIDER,
704 680 'size_units' => [ 's', 'ms', 'custom' ],
705 681 'default' => [
706 682 'unit' => 's',
@@ -782,9 +758,9 @@
782 758 <i class="<?php echo esc_attr( $item['icon'] ); ?>" aria-hidden="true"></i>
783 759 <?php } ?>
784 760 </span>
785 761 <?php endif; ?>
786 - <span <?php $this->print_render_attribute_string( $repeater_setting_key ); ?>><?php echo wp_kses_post( $item['text'] ); ?></span>
762 + <span <?php $this->print_render_attribute_string( $repeater_setting_key ); ?>><?php $this->print_unescaped_setting( 'text', 'icon_list', $index ); ?></span>
787 763 <?php if ( ! empty( $item['link']['url'] ) ) : ?>
788 764 </a>
789 765 <?php endif; ?>
790 766 </li>
@@ -802,34 +778,8 @@
802 778 *
803 779 * @since 2.9.0
804 780 * @access protected
805 781 */
806 - public function render_markdown(): string {
807 - $settings = $this->get_settings_for_display();
808 -
809 - if ( empty( $settings['icon_list'] ) ) {
810 - return '';
811 - }
812 -
813 - $lines = [];
814 -
815 - foreach ( $settings['icon_list'] as $item ) {
816 - $text = Utils::html_to_plain_text( $item['text'] ?? '' );
817 -
818 - if ( empty( $text ) ) {
819 - continue;
820 - }
821 -
822 - if ( ! empty( $item['link']['url'] ) ) {
823 - $text = '[' . $text . '](' . esc_url( $item['link']['url'] ) . ')';
824 - }
825 -
826 - $lines[] = '- ' . $text;
827 - }
828 -
829 - return implode( "\n", $lines );
830 - }
831 -
832 782 protected function content_template() {
833 783 ?>
834 784 <#
835 785 view.addRenderAttribute( 'icon_list', 'class', 'elementor-icon-list-items' );
@@ -852,10 +802,10 @@
852 802
853 803 view.addInlineEditingAttributes( iconTextKey ); #>
854 804
855 805 <li {{{ view.getRenderAttributeString( 'list_item' ) }}}>
856 - <# if ( item.link && item.link?.url ) { #>
857 - <a href="{{ elementor.helpers.sanitizeUrl( item.link?.url ) }}">
806 + <# if ( item.link && item.link.url ) { #>
807 + <a href="{{ item.link.url }}">
858 808 <# } #>
859 809 <# if ( item.icon || item.selected_icon.value ) { #>
860 810 <span class="elementor-icon-list-icon">
861 811 <#
@@ -869,9 +819,9 @@
869 819 #>
870 820 </span>
871 821 <# } #>
872 822 <span {{{ view.getRenderAttributeString( iconTextKey ) }}}>{{{ item.text }}}</span>
873 - <# if ( item.link && item.link?.url ) { #>
823 + <# if ( item.link && item.link.url ) { #>
874 824 </a>
875 825 <# } #>
876 826 </li>
877 827 <#