PluginProbe
Elementor Website Builder – more than just a page builder / 3.20.2
Elementor Website Builder – more than just a page builder v3.20.2
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-box.php +71 -255 4.1.43.20.2 View file →
@@ -72,31 +72,9 @@
72 72 public function get_keywords() {
73 73 return [ 'icon box', 'icon' ];
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-box' ];
96 - }
97 -
98 - /**
99 77 * Register icon box widget controls.
100 78 *
101 79 * Adds different input fields to allow the user to change and customize the widget settings.
102 80 *
@@ -147,11 +125,10 @@
147 125 [
148 126 'label' => esc_html__( 'Shape', 'elementor' ),
149 127 'type' => Controls_Manager::SELECT,
150 128 'options' => [
129 + 'circle' => esc_html__( 'Circle', 'elementor' ),
151 130 'square' => esc_html__( 'Square', 'elementor' ),
152 - 'rounded' => esc_html__( 'Rounded', 'elementor' ),
153 - 'circle' => esc_html__( 'Circle', 'elementor' ),
154 131 ],
155 132 'default' => 'circle',
156 133 'condition' => [
157 134 'view!' => 'default',
@@ -235,35 +212,24 @@
235 212 'position',
236 213 [
237 214 'label' => esc_html__( 'Icon Position', 'elementor' ),
238 215 'type' => Controls_Manager::CHOOSE,
239 - 'default' => 'block-start',
240 - 'mobile_default' => 'block-start',
216 + 'default' => 'top',
217 + 'mobile_default' => 'top',
241 218 'options' => [
242 - 'inline-start' => [
243 - 'title' => esc_html__( 'Start', 'elementor' ),
219 + 'left' => [
220 + 'title' => esc_html__( 'Left', 'elementor' ),
244 221 'icon' => 'eicon-h-align-left',
245 222 ],
246 - 'inline-end' => [
247 - 'title' => esc_html__( 'End', 'elementor' ),
248 - 'icon' => 'eicon-h-align-right',
249 - ],
250 - 'block-start' => [
223 + 'top' => [
251 224 'title' => esc_html__( 'Top', 'elementor' ),
252 225 'icon' => 'eicon-v-align-top',
253 226 ],
254 - 'block-end' => [
255 - 'title' => esc_html__( 'Bottom', 'elementor' ),
256 - 'icon' => 'eicon-v-align-bottom',
227 + 'right' => [
228 + 'title' => esc_html__( 'Right', 'elementor' ),
229 + 'icon' => 'eicon-h-align-right',
257 230 ],
258 231 ],
259 - 'classes' => 'elementor-control-start-end',
260 - 'classes_dictionary' => [
261 - 'left' => is_rtl() ? 'inline-end' : 'inline-start',
262 - 'right' => is_rtl() ? 'inline-start' : 'inline-end',
263 - 'top' => 'block-start',
264 - 'bottom' => 'block-end',
265 - ],
266 232 'prefix_class' => 'elementor%s-position-',
267 233 'condition' => [
268 234 'selected_icon[value]!' => '',
269 235 ],
@@ -289,19 +255,12 @@
289 255 'icon' => 'eicon-v-align-bottom',
290 256 ],
291 257 ],
292 258 'default' => 'top',
293 - 'selectors_dictionary' => [
294 - 'top' => 'start',
295 - 'middle' => 'center',
296 - 'bottom' => 'end',
297 - ],
298 - 'selectors' => [
299 - '{{WRAPPER}} .elementor-icon-box-wrapper' => 'align-items: {{VALUE}};',
300 - ],
259 + 'toggle' => false,
260 + 'prefix_class' => 'elementor-vertical-align-',
301 261 'condition' => [
302 - 'selected_icon[value]!' => '',
303 - 'position' => [ 'left', 'right', 'inline-start', 'inline-end' ],
262 + 'position!' => 'top',
304 263 ],
305 264 ]
306 265 );
307 266
@@ -310,10 +269,10 @@
310 269 [
311 270 'label' => esc_html__( 'Alignment', 'elementor' ),
312 271 'type' => Controls_Manager::CHOOSE,
313 272 'options' => [
314 - 'start' => [
315 - 'title' => esc_html__( 'Start', 'elementor' ),
273 + 'left' => [
274 + 'title' => esc_html__( 'Left', 'elementor' ),
316 275 'icon' => 'eicon-text-align-left',
317 276 ],
318 277 'center' => [
319 278 'title' => esc_html__( 'Center', 'elementor' ),
@@ -318,10 +277,10 @@
318 277 'center' => [
319 278 'title' => esc_html__( 'Center', 'elementor' ),
320 279 'icon' => 'eicon-text-align-center',
321 280 ],
322 - 'end' => [
323 - 'title' => esc_html__( 'End', 'elementor' ),
281 + 'right' => [
282 + 'title' => esc_html__( 'Right', 'elementor' ),
324 283 'icon' => 'eicon-text-align-right',
325 284 ],
326 285 'justify' => [
327 286 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -327,13 +286,8 @@
327 286 'title' => esc_html__( 'Justified', 'elementor' ),
328 287 'icon' => 'eicon-text-align-justify',
329 288 ],
330 289 ],
331 - 'classes' => 'elementor-control-start-end',
332 - 'selectors_dictionary' => [
333 - 'left' => is_rtl() ? 'end' : 'start',
334 - 'right' => is_rtl() ? 'start' : 'end',
335 - ],
336 290 'selectors' => [
337 291 '{{WRAPPER}} .elementor-icon-box-wrapper' => 'text-align: {{VALUE}};',
338 292 ],
339 293 'separator' => 'after',
@@ -360,9 +314,9 @@
360 314 'max' => 10,
361 315 ],
362 316 ],
363 317 'selectors' => [
364 - '{{WRAPPER}} .elementor-icon-box-wrapper' => 'gap: {{SIZE}}{{UNIT}};',
318 + '{{WRAPPER}}' => '--icon-box-icon-margin: {{SIZE}}{{UNIT}}',
365 319 ],
366 320 'condition' => [
367 321 'selected_icon[value]!' => '',
368 322 ],
@@ -388,9 +342,9 @@
388 342 'max' => 10,
389 343 ],
390 344 ],
391 345 'selectors' => [
392 - '{{WRAPPER}} .elementor-icon-box-title' => 'margin-block-end: {{SIZE}}{{UNIT}};',
346 + '{{WRAPPER}} .elementor-icon-box-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
393 347 ],
394 348 ]
395 349 );
396 350
@@ -463,14 +417,10 @@
463 417 'label' => esc_html__( 'Primary Color', 'elementor' ),
464 418 'type' => Controls_Manager::COLOR,
465 419 'default' => '',
466 420 'selectors' => [
467 - '{{WRAPPER}}.elementor-view-stacked:has(:hover) .elementor-icon,
468 - {{WRAPPER}}.elementor-view-stacked:has(:focus) .elementor-icon' => 'background-color: {{VALUE}};',
469 - '{{WRAPPER}}.elementor-view-framed:has(:hover) .elementor-icon,
470 - {{WRAPPER}}.elementor-view-default:has(:hover) .elementor-icon,
471 - {{WRAPPER}}.elementor-view-framed:has(:focus) .elementor-icon,
472 - {{WRAPPER}}.elementor-view-default:has(:focus) .elementor-icon' => 'fill: {{VALUE}}; color: {{VALUE}}; border-color: {{VALUE}};',
421 + '{{WRAPPER}}.elementor-view-stacked .elementor-icon:hover' => 'background-color: {{VALUE}};',
422 + '{{WRAPPER}}.elementor-view-framed .elementor-icon:hover, {{WRAPPER}}.elementor-view-default .elementor-icon:hover' => 'fill: {{VALUE}}; color: {{VALUE}}; border-color: {{VALUE}};',
473 423 ],
474 424 ]
475 425 );
476 426
@@ -483,32 +433,15 @@
483 433 'condition' => [
484 434 'view!' => 'default',
485 435 ],
486 436 'selectors' => [
487 - '{{WRAPPER}}.elementor-view-framed:has(:hover) .elementor-icon,
488 - {{WRAPPER}}.elementor-view-framed:has(:focus) .elementor-icon' => 'background-color: {{VALUE}};',
489 - '{{WRAPPER}}.elementor-view-stacked:has(:hover) .elementor-icon,
490 - {{WRAPPER}}.elementor-view-stacked:has(:focus) .elementor-icon' => 'fill: {{VALUE}}; color: {{VALUE}};',
437 + '{{WRAPPER}}.elementor-view-framed .elementor-icon:hover' => 'background-color: {{VALUE}};',
438 + '{{WRAPPER}}.elementor-view-stacked .elementor-icon:hover' => 'fill: {{VALUE}}; color: {{VALUE}};',
491 439 ],
492 440 ]
493 441 );
494 442
495 443 $this->add_control(
496 - 'hover_icon_colors_transition_duration',
497 - [
498 - 'label' => esc_html__( 'Transition Duration', 'elementor' ),
499 - 'type' => Controls_Manager::SLIDER,
500 - 'size_units' => [ 's', 'ms', 'custom' ],
501 - 'default' => [
502 - 'unit' => 's',
503 - ],
504 - 'selectors' => [
505 - '{{WRAPPER}} .elementor-icon' => 'transition-duration: {{SIZE}}{{UNIT}};',
506 - ],
507 - ]
508 - );
509 -
510 - $this->add_control(
511 444 'hover_animation',
512 445 [
513 446 'label' => esc_html__( 'Hover Animation', 'elementor' ),
514 447 'type' => Controls_Manager::HOVER_ANIMATION,
@@ -650,8 +583,23 @@
650 583 'separator' => 'before',
651 584 ]
652 585 );
653 586
587 + $this->add_control(
588 + 'title_color',
589 + [
590 + 'label' => esc_html__( 'Color', 'elementor' ),
591 + 'type' => Controls_Manager::COLOR,
592 + 'default' => '',
593 + 'selectors' => [
594 + '{{WRAPPER}} .elementor-icon-box-title' => 'color: {{VALUE}};',
595 + ],
596 + 'global' => [
597 + 'default' => Global_Colors::COLOR_PRIMARY,
598 + ],
599 + ]
600 + );
601 +
654 602 $this->add_group_control(
655 603 Group_Control_Typography::get_type(),
656 604 [
657 605 'name' => 'title_typography',
@@ -677,85 +625,32 @@
677 625 'selector' => '{{WRAPPER}} .elementor-icon-box-title',
678 626 ]
679 627 );
680 628
681 - $this->start_controls_tabs( 'icon_box_title_colors' );
682 -
683 - $this->start_controls_tab(
684 - 'icon_box_title_colors_normal',
685 - [
686 - 'label' => esc_html__( 'Normal', 'elementor' ),
687 - ]
688 - );
689 -
690 629 $this->add_control(
691 - 'title_color',
630 + 'heading_description',
692 631 [
693 - 'label' => esc_html__( 'Color', 'elementor' ),
694 - 'type' => Controls_Manager::COLOR,
695 - 'default' => '',
696 - 'selectors' => [
697 - '{{WRAPPER}} .elementor-icon-box-title' => 'color: {{VALUE}};',
698 - ],
699 - 'global' => [
700 - 'default' => Global_Colors::COLOR_PRIMARY,
701 - ],
632 + 'label' => esc_html__( 'Description', 'elementor' ),
633 + 'type' => Controls_Manager::HEADING,
634 + 'separator' => 'before',
702 635 ]
703 636 );
704 637
705 - $this->end_controls_tab();
706 -
707 - $this->start_controls_tab(
708 - 'icon_box_title_colors_hover',
709 - [
710 - 'label' => esc_html__( 'Hover', 'elementor' ),
711 - ]
712 - );
713 -
714 638 $this->add_control(
715 - 'hover_title_color',
639 + 'description_color',
716 640 [
717 641 'label' => esc_html__( 'Color', 'elementor' ),
718 642 'type' => Controls_Manager::COLOR,
719 643 'default' => '',
720 644 'selectors' => [
721 - '{{WRAPPER}}:has(:hover) .elementor-icon-box-title,
722 - {{WRAPPER}}:has(:focus) .elementor-icon-box-title' => 'color: {{VALUE}};',
645 + '{{WRAPPER}} .elementor-icon-box-description' => 'color: {{VALUE}};',
723 646 ],
724 647 'global' => [
725 - 'default' => Global_Colors::COLOR_PRIMARY,
648 + 'default' => Global_Colors::COLOR_TEXT,
726 649 ],
727 650 ]
728 651 );
729 652
730 - $this->add_control(
731 - 'hover_title_color_transition_duration',
732 - [
733 - 'label' => esc_html__( 'Transition Duration', 'elementor' ),
734 - 'type' => Controls_Manager::SLIDER,
735 - 'size_units' => [ 's', 'ms', 'custom' ],
736 - 'default' => [
737 - 'unit' => 's',
738 - ],
739 - 'selectors' => [
740 - '{{WRAPPER}} .elementor-icon-box-title' => 'transition-duration: {{SIZE}}{{UNIT}};',
741 - ],
742 - ]
743 - );
744 -
745 - $this->end_controls_tab();
746 -
747 - $this->end_controls_tabs();
748 -
749 - $this->add_control(
750 - 'heading_description',
751 - [
752 - 'label' => esc_html__( 'Description', 'elementor' ),
753 - 'type' => Controls_Manager::HEADING,
754 - 'separator' => 'before',
755 - ]
756 - );
757 -
758 653 $this->add_group_control(
759 654 Group_Control_Typography::get_type(),
760 655 [
761 656 'name' => 'description_typography',
@@ -773,23 +668,8 @@
773 668 'selector' => '{{WRAPPER}} .elementor-icon-box-description',
774 669 ]
775 670 );
776 671
777 - $this->add_control(
778 - 'description_color',
779 - [
780 - 'label' => esc_html__( 'Color', 'elementor' ),
781 - 'type' => Controls_Manager::COLOR,
782 - 'default' => '',
783 - 'selectors' => [
784 - '{{WRAPPER}} .elementor-icon-box-description' => 'color: {{VALUE}};',
785 - ],
786 - 'global' => [
787 - 'default' => Global_Colors::COLOR_TEXT,
788 - ],
789 - ]
790 - );
791 -
792 672 $this->end_controls_section();
793 673 }
794 674
795 675 /**
@@ -804,35 +684,23 @@
804 684 $settings = $this->get_settings_for_display();
805 685 $has_link = ! empty( $settings['link']['url'] );
806 686 $html_tag = $has_link ? 'a' : 'span';
807 687
808 - $this->add_render_attribute( 'icon', 'class', 'elementor-icon' );
688 + $this->add_render_attribute( 'icon', 'class', [ 'elementor-icon', 'elementor-animation-' . $settings['hover_animation'] ] );
809 689
810 - if ( ! empty( $settings['hover_animation'] ) ) {
811 - $this->add_render_attribute( 'icon', 'class', 'elementor-animation-' . $settings['hover_animation'] );
690 + if ( ! isset( $settings['icon'] ) && ! Icons_Manager::is_migration_allowed() ) {
691 + // add old default
692 + $settings['icon'] = 'fa fa-star';
812 693 }
813 694
814 - $has_icon = ! empty( $settings['selected_icon']['value'] );
815 - $has_content = ! Utils::is_empty( $settings['title_text'] ) || ! Utils::is_empty( $settings['description_text'] );
695 + $has_icon = ! empty( $settings['icon'] );
816 696
817 - if ( ! $has_icon && ! $has_content ) {
818 - return;
819 - }
820 -
821 697 if ( $has_link ) {
822 698 $this->add_link_attributes( 'link', $settings['link'] );
823 699 $this->add_render_attribute( 'icon', 'tabindex', '-1' );
824 - if ( ! empty( $settings['title_text'] ) ) {
825 - $this->add_render_attribute( 'icon', 'aria-label', $settings['title_text'] );
826 - }
827 700 }
828 701
829 - if ( ! isset( $settings['icon'] ) && ! Icons_Manager::is_migration_allowed() ) {
830 - // add old default
831 - $settings['icon'] = 'fa fa-star';
832 - }
833 -
834 - if ( ! empty( $settings['icon'] ) ) {
702 + if ( $has_icon ) {
835 703 $this->add_render_attribute( 'i', 'class', $settings['icon'] );
836 704 $this->add_render_attribute( 'i', 'aria-hidden', 'true' );
837 705 }
838 706
@@ -839,14 +707,16 @@
839 707 $this->add_render_attribute( 'description_text', 'class', 'elementor-icon-box-description' );
840 708
841 709 $this->add_inline_editing_attributes( 'title_text', 'none' );
842 710 $this->add_inline_editing_attributes( 'description_text' );
843 -
711 + if ( ! $has_icon && ! empty( $settings['selected_icon']['value'] ) ) {
712 + $has_icon = true;
713 + }
844 714 $migrated = isset( $settings['__fa4_migrated']['selected_icon'] );
845 715 $is_new = ! isset( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
716 +
846 717 ?>
847 718 <div class="elementor-icon-box-wrapper">
848 -
849 719 <?php if ( $has_icon ) : ?>
850 720 <div class="elementor-icon-box-icon">
851 721 <<?php Utils::print_validated_html_tag( $html_tag ); ?> <?php $this->print_render_attribute_string( 'link' ); ?> <?php $this->print_render_attribute_string( 'icon' ); ?>>
852 722 <?php
@@ -858,29 +728,20 @@
858 728 ?>
859 729 </<?php Utils::print_validated_html_tag( $html_tag ); ?>>
860 730 </div>
861 731 <?php endif; ?>
862 -
863 - <?php if ( $has_content ) : ?>
864 732 <div class="elementor-icon-box-content">
865 -
866 - <?php if ( ! Utils::is_empty( $settings['title_text'] ) ) : ?>
867 - <<?php Utils::print_validated_html_tag( $settings['title_size'] ); ?> class="elementor-icon-box-title">
868 - <<?php Utils::print_validated_html_tag( $html_tag ); ?> <?php $this->print_render_attribute_string( 'link' ); ?> <?php $this->print_render_attribute_string( 'title_text' ); ?>>
869 - <?php echo wp_kses_post( $settings['title_text'] ); ?>
870 - </<?php Utils::print_validated_html_tag( $html_tag ); ?>>
871 - </<?php Utils::print_validated_html_tag( $settings['title_size'] ); ?>>
872 - <?php endif; ?>
873 -
733 + <<?php Utils::print_validated_html_tag( $settings['title_size'] ); ?> class="elementor-icon-box-title">
734 + <<?php Utils::print_validated_html_tag( $html_tag ); ?> <?php $this->print_render_attribute_string( 'link' ); ?> <?php $this->print_render_attribute_string( 'title_text' ); ?>>
735 + <?php $this->print_unescaped_setting( 'title_text' ); ?>
736 + </<?php Utils::print_validated_html_tag( $html_tag ); ?>>
737 + </<?php Utils::print_validated_html_tag( $settings['title_size'] ); ?>>
874 738 <?php if ( ! Utils::is_empty( $settings['description_text'] ) ) : ?>
875 739 <p <?php $this->print_render_attribute_string( 'description_text' ); ?>>
876 - <?php echo wp_kses_post( $settings['description_text'] ); ?>
740 + <?php $this->print_unescaped_setting( 'description_text' ); ?>
877 741 </p>
878 742 <?php endif; ?>
879 -
880 743 </div>
881 - <?php endif; ?>
882 -
883 744 </div>
884 745 <?php
885 746 }
886 747
@@ -894,34 +755,18 @@
894 755 */
895 756 protected function content_template() {
896 757 ?>
897 758 <#
898 - // For older version `settings.icon` is needed.
899 - var hasIcon = settings.icon || settings.selected_icon.value;
900 - var hasContent = settings.title_text || settings.description_text;
901 -
902 - if ( ! hasIcon && ! hasContent ) {
903 - return;
904 - }
905 -
906 - var hasLink = settings.link?.url,
759 + var hasLink = settings.link.url,
907 760 htmlTag = hasLink ? 'a' : 'span',
908 761 iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ),
909 - migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' ),
910 - titleSizeTag = elementor.helpers.validateHTMLTag( settings.title_size );
762 + migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' );
911 763
912 - view.addRenderAttribute( 'icon', 'class', 'elementor-icon' );
764 + view.addRenderAttribute( 'icon', 'class', 'elementor-icon elementor-animation-' + settings.hover_animation );
913 765
914 - if ( '' !== settings.hover_animation ) {
915 - view.addRenderAttribute( 'icon', 'class', 'elementor-animation-' + settings.hover_animation );
916 - }
917 -
918 766 if ( hasLink ) {
919 - view.addRenderAttribute( 'link', 'href', elementor.helpers.sanitizeUrl( settings.link?.url ) );
767 + view.addRenderAttribute( 'link', 'href', settings.link.url );
920 768 view.addRenderAttribute( 'icon', 'tabindex', '-1' );
921 - if ( '' !== settings.title_text ) {
922 - view.addRenderAttribute( 'icon', 'aria-label', settings.title_text );
923 - }
924 769 }
925 770
926 771 view.addRenderAttribute( 'description_text', 'class', 'elementor-icon-box-description' );
927 772
@@ -928,39 +773,31 @@
928 773 view.addInlineEditingAttributes( 'title_text', 'none' );
929 774 view.addInlineEditingAttributes( 'description_text' );
930 775 #>
931 776 <div class="elementor-icon-box-wrapper">
932 -
933 - <# if ( hasIcon ) { #>
777 + <?php // settings.icon is needed for older version ?>
778 + <# if ( settings.icon || settings.selected_icon.value ) { #>
934 779 <div class="elementor-icon-box-icon">
935 780 <{{{ htmlTag }}} {{{ view.getRenderAttributeString( 'link' ) }}} {{{ view.getRenderAttributeString( 'icon' ) }}}>
936 781 <# if ( iconHTML && iconHTML.rendered && ( ! settings.icon || migrated ) ) { #>
937 - {{{ elementor.helpers.sanitize( iconHTML.value ) }}}
782 + {{{ iconHTML.value }}}
938 783 <# } else { #>
939 - <i class="{{ _.escape( settings.icon ) }}" aria-hidden="true"></i>
784 + <i class="{{ settings.icon }}" aria-hidden="true"></i>
940 785 <# } #>
941 786 </{{{ htmlTag }}}>
942 787 </div>
943 788 <# } #>
944 -
945 - <# if ( hasContent ) { #>
946 789 <div class="elementor-icon-box-content">
947 -
948 - <# if ( settings.title_text ) { #>
790 + <# var titleSizeTag = elementor.helpers.validateHTMLTag( settings.title_size ); #>
949 791 <{{{ titleSizeTag }}} class="elementor-icon-box-title">
950 792 <{{{ htmlTag }}} {{{ view.getRenderAttributeString( 'link' ) }}} {{{ view.getRenderAttributeString( 'title_text' ) }}}>
951 - {{{ elementor.helpers.sanitize( settings.title_text ) }}}
793 + {{{ settings.title_text }}}
952 794 </{{{ htmlTag }}}>
953 795 </{{{ titleSizeTag }}}>
954 - <# } #>
955 -
956 796 <# if ( settings.description_text ) { #>
957 - <p {{{ view.getRenderAttributeString( 'description_text' ) }}}>{{{ elementor.helpers.sanitize( settings.description_text ) }}}</p>
797 + <p {{{ view.getRenderAttributeString( 'description_text' ) }}}>{{{ settings.description_text }}}</p>
958 798 <# } #>
959 -
960 799 </div>
961 - <# } #>
962 -
963 800 </div>
964 801 <?php
965 802 }
966 803
@@ -965,27 +802,6 @@
965 802 }
966 803
967 804 public function on_import( $element ) {
968 805 return Icons_Manager::on_import_migration( $element, 'icon', 'selected_icon', true );
969 - }
970 -
971 - public function render_markdown(): string {
972 - $settings = $this->get_settings_for_display();
973 - $title = Utils::html_to_plain_text( $settings['title_text'] ?? '' );
974 - $description = Utils::html_to_plain_text( $settings['description_text'] ?? '' );
975 - if ( empty( $title ) && empty( $description ) ) {
976 - return '';
977 - }
978 - $parts = [];
979 - if ( ! empty( $title ) ) {
980 - if ( ! empty( $settings['link']['url'] ) ) {
981 - $parts[] = '### [' . $title . '](' . esc_url( $settings['link']['url'] ) . ')';
982 - } else {
983 - $parts[] = '### ' . $title;
984 - }
985 - }
986 - if ( ! empty( $description ) ) {
987 - $parts[] = $description;
988 - }
989 - return implode( "\n\n", $parts );
990 806 }
991 807 }