PluginProbe
Elementor Website Builder – more than just a page builder / 3.30.3
Elementor Website Builder – more than just a page builder v3.30.3
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
elementor / includes / widgets / traits / button-trait.php

button-trait.php in Elementor Website Builder – more than just a page builder 3.30.3, at includes/widgets/traits/button-trait.php

701 lines 19.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Includes\Widgets\Traits;
3
4 use Elementor\Controls_Manager;
5 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
6 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
7 use Elementor\Group_Control_Background;
8 use Elementor\Group_Control_Border;
9 use Elementor\Group_Control_Box_Shadow;
10 use Elementor\Group_Control_Text_Shadow;
11 use Elementor\Group_Control_Typography;
12 use Elementor\Icons_Manager;
13 use Elementor\Widget_Base;
14 use Elementor\Plugin;
15
16 if ( ! defined( 'ABSPATH' ) ) {
17 exit; // Exit if accessed directly.
18 }
19
20 trait Button_Trait {
21 /**
22 * Get button sizes.
23 *
24 * Retrieve an array of button sizes for the button widget.
25 *
26 * @since 3.4.0
27 * @access public
28 * @static
29 *
30 * @return array An array containing button sizes.
31 */
32 public static function get_button_sizes() {
33 return [
34 'xs' => esc_html__( 'Extra Small', 'elementor' ),
35 'sm' => esc_html__( 'Small', 'elementor' ),
36 'md' => esc_html__( 'Medium', 'elementor' ),
37 'lg' => esc_html__( 'Large', 'elementor' ),
38 'xl' => esc_html__( 'Extra Large', 'elementor' ),
39 ];
40 }
41
42 /**
43 * @since 3.4.0
44 *
45 * @param array $args {
46 * An array of values for the button adjustments.
47 *
48 * @type array $section_condition Set of conditions to hide the controls.
49 * @type string $button_text Text contained in button.
50 * @type string $text_control_label Name for the label of the text control.
51 * @type array $icon_exclude_inline_options Set of icon types to exclude from icon controls.
52 * }
53 */
54 protected function register_button_content_controls( $args = [] ) {
55 $default_args = [
56 'section_condition' => [],
57 'button_default_text' => esc_html__( 'Click here', 'elementor' ),
58 'text_control_label' => esc_html__( 'Text', 'elementor' ),
59 'icon_exclude_inline_options' => [],
60 ];
61
62 $args = wp_parse_args( $args, $default_args );
63
64 $this->add_control(
65 'button_type',
66 [
67 'label' => esc_html__( 'Type', 'elementor' ),
68 'type' => Controls_Manager::SELECT,
69 'default' => '',
70 'options' => [
71 '' => esc_html__( 'Default', 'elementor' ),
72 'info' => esc_html__( 'Info', 'elementor' ),
73 'success' => esc_html__( 'Success', 'elementor' ),
74 'warning' => esc_html__( 'Warning', 'elementor' ),
75 'danger' => esc_html__( 'Danger', 'elementor' ),
76 ],
77 'prefix_class' => 'elementor-button-',
78 'condition' => $args['section_condition'],
79 ]
80 );
81
82 $this->add_control(
83 'text',
84 [
85 'label' => $args['text_control_label'],
86 'type' => Controls_Manager::TEXT,
87 'dynamic' => [
88 'active' => true,
89 ],
90 'default' => $args['button_default_text'],
91 'placeholder' => $args['button_default_text'],
92 'condition' => $args['section_condition'],
93 ]
94 );
95
96 $this->add_control(
97 'link',
98 [
99 'label' => esc_html__( 'Link', 'elementor' ),
100 'type' => Controls_Manager::URL,
101 'dynamic' => [
102 'active' => true,
103 ],
104 'default' => [
105 'url' => '#',
106 ],
107 'condition' => $args['section_condition'],
108 ]
109 );
110
111 $this->add_control(
112 'size',
113 [
114 'label' => esc_html__( 'Size', 'elementor' ),
115 'type' => Controls_Manager::SELECT,
116 'default' => 'sm',
117 'options' => self::get_button_sizes(),
118 'style_transfer' => true,
119 'condition' => array_merge( $args['section_condition'], [ 'size[value]!' => 'sm' ] ), // a workaround to hide the control, unless it's in use (not default).
120 ]
121 );
122
123 $this->add_control(
124 'selected_icon',
125 [
126 'label' => esc_html__( 'Icon', 'elementor' ),
127 'type' => Controls_Manager::ICONS,
128 'fa4compatibility' => 'icon',
129 'skin' => 'inline',
130 'label_block' => false,
131 'condition' => $args['section_condition'],
132 'icon_exclude_inline_options' => $args['icon_exclude_inline_options'],
133 ]
134 );
135
136 $start = is_rtl() ? 'right' : 'left';
137 $end = is_rtl() ? 'left' : 'right';
138
139 $this->add_control(
140 'icon_align',
141 [
142 'label' => esc_html__( 'Icon Position', 'elementor' ),
143 'type' => Controls_Manager::CHOOSE,
144 'default' => is_rtl() ? 'row-reverse' : 'row',
145 'options' => [
146 'row' => [
147 'title' => esc_html__( 'Start', 'elementor' ),
148 'icon' => "eicon-h-align-{$start}",
149 ],
150 'row-reverse' => [
151 'title' => esc_html__( 'End', 'elementor' ),
152 'icon' => "eicon-h-align-{$end}",
153 ],
154 ],
155 'selectors_dictionary' => [
156 'left' => is_rtl() ? 'row-reverse' : 'row',
157 'right' => is_rtl() ? 'row' : 'row-reverse',
158 ],
159 'selectors' => [
160 '{{WRAPPER}} .elementor-button-content-wrapper' => 'flex-direction: {{VALUE}};',
161 ],
162 'condition' => array_merge(
163 $args['section_condition'],
164 [
165 'text!' => '',
166 'selected_icon[value]!' => '',
167 ]
168 ),
169 ]
170 );
171
172 $this->add_control(
173 'icon_indent',
174 [
175 'label' => esc_html__( 'Icon Spacing', 'elementor' ),
176 'type' => Controls_Manager::SLIDER,
177 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
178 'range' => [
179 'px' => [
180 'max' => 50,
181 ],
182 'em' => [
183 'max' => 5,
184 ],
185 'rem' => [
186 'max' => 5,
187 ],
188 ],
189 'selectors' => [
190 '{{WRAPPER}} .elementor-button .elementor-button-content-wrapper' => 'gap: {{SIZE}}{{UNIT}};',
191 ],
192 'condition' => array_merge(
193 $args['section_condition'],
194 [
195 'text!' => '',
196 'selected_icon[value]!' => '',
197 ]
198 ),
199 ]
200 );
201
202 $this->add_control(
203 'button_css_id',
204 [
205 'label' => esc_html__( 'Button ID', 'elementor' ),
206 'type' => Controls_Manager::TEXT,
207 'dynamic' => [
208 'active' => true,
209 ],
210 'ai' => [
211 'active' => false,
212 ],
213 'default' => '',
214 'title' => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'elementor' ),
215 'description' => sprintf(
216 esc_html__( 'Please make sure the ID is unique and not used elsewhere on the page this form is displayed. This field allows %1$sA-z 0-9%2$s & underscore chars without spaces.', 'elementor' ),
217 '<code>',
218 '</code>'
219 ),
220 'separator' => 'before',
221 'condition' => $args['section_condition'],
222 ]
223 );
224 }
225
226 /**
227 * @since 3.4.0
228 *
229 * @param array $args {
230 * An array of values for the button adjustments.
231 *
232 * @type array $section_condition Set of conditions to hide the controls.
233 * @type string $alignment_default Default position for the button.
234 * @type string $alignment_control_prefix_class Prefix class name for the button position control.
235 * @type string $content_alignment_default Default alignment for the button content.
236 * }
237 */
238 protected function register_button_style_controls( $args = [] ) {
239 $default_args = [
240 'section_condition' => [],
241 'alignment_default' => '',
242 'alignment_control_prefix_class' => 'elementor%s-align-',
243 'content_alignment_default' => '',
244 ];
245
246 $args = wp_parse_args( $args, $default_args );
247
248 $this->add_responsive_control(
249 'align',
250 [
251 'label' => esc_html__( 'Position', 'elementor' ),
252 'type' => Controls_Manager::CHOOSE,
253 'options' => [
254 'left' => [
255 'title' => esc_html__( 'Left', 'elementor' ),
256 'icon' => 'eicon-h-align-left',
257 ],
258 'center' => [
259 'title' => esc_html__( 'Center', 'elementor' ),
260 'icon' => 'eicon-h-align-center',
261 ],
262 'right' => [
263 'title' => esc_html__( 'Right', 'elementor' ),
264 'icon' => 'eicon-h-align-right',
265 ],
266 'justify' => [
267 'title' => esc_html__( 'Stretch', 'elementor' ),
268 'icon' => 'eicon-h-align-stretch',
269 ],
270 ],
271 'prefix_class' => $args['alignment_control_prefix_class'],
272 'default' => $args['alignment_default'],
273 'condition' => $args['section_condition'],
274 ]
275 );
276
277 $start = is_rtl() ? 'right' : 'left';
278 $end = is_rtl() ? 'left' : 'right';
279
280 $this->add_responsive_control(
281 'content_align',
282 [
283 'label' => esc_html__( 'Alignment', 'elementor' ),
284 'type' => Controls_Manager::CHOOSE,
285 'options' => [
286 'start' => [
287 'title' => esc_html__( 'Start', 'elementor' ),
288 'icon' => "eicon-text-align-{$start}",
289 ],
290 'center' => [
291 'title' => esc_html__( 'Center', 'elementor' ),
292 'icon' => 'eicon-text-align-center',
293 ],
294 'end' => [
295 'title' => esc_html__( 'End', 'elementor' ),
296 'icon' => "eicon-text-align-{$end}",
297 ],
298 'space-between' => [
299 'title' => esc_html__( 'Space between', 'elementor' ),
300 'icon' => 'eicon-text-align-justify',
301 ],
302 ],
303 'default' => $args['content_alignment_default'],
304 'selectors' => [
305 '{{WRAPPER}} .elementor-button .elementor-button-content-wrapper' => 'justify-content: {{VALUE}};',
306 ],
307 'condition' => array_merge( $args['section_condition'], [ 'align' => 'justify' ] ),
308 ]
309 );
310
311 $this->add_group_control(
312 Group_Control_Typography::get_type(),
313 [
314 'name' => 'typography',
315 'global' => [
316 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
317 ],
318 'selector' => '{{WRAPPER}} .elementor-button',
319 'condition' => $args['section_condition'],
320 ]
321 );
322
323 $this->add_group_control(
324 Group_Control_Text_Shadow::get_type(),
325 [
326 'name' => 'text_shadow',
327 'selector' => '{{WRAPPER}} .elementor-button',
328 'condition' => $args['section_condition'],
329 ]
330 );
331
332 $this->start_controls_tabs( 'tabs_button_style', [
333 'condition' => $args['section_condition'],
334 ] );
335
336 $this->start_controls_tab(
337 'tab_button_normal',
338 [
339 'label' => esc_html__( 'Normal', 'elementor' ),
340 'condition' => $args['section_condition'],
341 ]
342 );
343
344 $this->add_control(
345 'button_text_color',
346 [
347 'label' => esc_html__( 'Text Color', 'elementor' ),
348 'type' => Controls_Manager::COLOR,
349 'default' => '',
350 'selectors' => [
351 '{{WRAPPER}} .elementor-button' => 'fill: {{VALUE}}; color: {{VALUE}};',
352 ],
353 'condition' => $args['section_condition'],
354 ]
355 );
356
357 $this->add_group_control(
358 Group_Control_Background::get_type(),
359 [
360 'name' => 'background',
361 'types' => [ 'classic', 'gradient' ],
362 'exclude' => [ 'image' ],
363 'selector' => '{{WRAPPER}} .elementor-button',
364 'fields_options' => [
365 'background' => [
366 'default' => 'classic',
367 ],
368 'color' => [
369 'global' => [
370 'default' => Global_Colors::COLOR_ACCENT,
371 ],
372 ],
373 ],
374 'condition' => $args['section_condition'],
375 ]
376 );
377
378 $this->add_group_control(
379 Group_Control_Box_Shadow::get_type(),
380 [
381 'name' => 'button_box_shadow',
382 'selector' => '{{WRAPPER}} .elementor-button',
383 'condition' => $args['section_condition'],
384 ]
385 );
386
387 $this->end_controls_tab();
388
389 $this->start_controls_tab(
390 'tab_button_hover',
391 [
392 'label' => esc_html__( 'Hover', 'elementor' ),
393 'condition' => $args['section_condition'],
394 ]
395 );
396
397 $this->add_control(
398 'hover_color',
399 [
400 'label' => esc_html__( 'Text Color', 'elementor' ),
401 'type' => Controls_Manager::COLOR,
402 'selectors' => [
403 '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus' => 'color: {{VALUE}};',
404 '{{WRAPPER}} .elementor-button:hover svg, {{WRAPPER}} .elementor-button:focus svg' => 'fill: {{VALUE}};',
405 ],
406 'condition' => $args['section_condition'],
407 ]
408 );
409
410 $this->add_group_control(
411 Group_Control_Background::get_type(),
412 [
413 'name' => 'button_background_hover',
414 'types' => [ 'classic', 'gradient' ],
415 'exclude' => [ 'image' ],
416 'selector' => '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus',
417 'fields_options' => [
418 'background' => [
419 'default' => 'classic',
420 ],
421 ],
422 'condition' => $args['section_condition'],
423 ]
424 );
425
426 $this->add_control(
427 'button_hover_border_color',
428 [
429 'label' => esc_html__( 'Border Color', 'elementor' ),
430 'type' => Controls_Manager::COLOR,
431 'selectors' => [
432 '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus' => 'border-color: {{VALUE}};',
433 ],
434 'condition' => $args['section_condition'],
435 ]
436 );
437
438 $this->add_group_control(
439 Group_Control_Box_Shadow::get_type(),
440 [
441 'name' => 'button_hover_box_shadow',
442 'selector' => '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus',
443 'condition' => $args['section_condition'],
444 ]
445 );
446
447 $this->add_control(
448 'button_hover_transition_duration',
449 [
450 'label' => esc_html__( 'Transition Duration', 'elementor' ),
451 'type' => Controls_Manager::SLIDER,
452 'size_units' => [ 's', 'ms', 'custom' ],
453 'default' => [
454 'unit' => 's',
455 ],
456 'selectors' => [
457 '{{WRAPPER}} .elementor-button' => 'transition-duration: {{SIZE}}{{UNIT}};',
458 ],
459 ]
460 );
461
462 $this->add_control(
463 'hover_animation',
464 [
465 'label' => esc_html__( 'Hover Animation', 'elementor' ),
466 'type' => Controls_Manager::HOVER_ANIMATION,
467 'condition' => $args['section_condition'],
468 ]
469 );
470
471 $this->end_controls_tab();
472
473 $this->end_controls_tabs();
474
475 $this->add_group_control(
476 Group_Control_Border::get_type(),
477 [
478 'name' => 'border',
479 'selector' => '{{WRAPPER}} .elementor-button',
480 'separator' => 'before',
481 'condition' => $args['section_condition'],
482 ]
483 );
484
485 $this->add_responsive_control(
486 'border_radius',
487 [
488 'label' => esc_html__( 'Border Radius', 'elementor' ),
489 'type' => Controls_Manager::DIMENSIONS,
490 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
491 'selectors' => [
492 '{{WRAPPER}} .elementor-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
493 ],
494 'condition' => $args['section_condition'],
495 ]
496 );
497
498 $this->add_responsive_control(
499 'text_padding',
500 [
501 'label' => esc_html__( 'Padding', 'elementor' ),
502 'type' => Controls_Manager::DIMENSIONS,
503 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
504 'selectors' => [
505 '{{WRAPPER}} .elementor-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
506 ],
507 'separator' => 'before',
508 'condition' => $args['section_condition'],
509 ]
510 );
511 }
512
513 /**
514 * Render button widget output on the frontend.
515 *
516 * Written in PHP and used to generate the final HTML.
517 *
518 * @param \Elementor\Widget_Base|null $instance
519 *
520 * @since 3.4.0
521 * @access protected
522 */
523 protected function render_button( Widget_Base $instance = null ) {
524 if ( empty( $instance ) ) {
525 $instance = $this;
526 }
527
528 $settings = $instance->get_settings_for_display();
529
530 if ( empty( $settings['text'] ) && empty( $settings['selected_icon']['value'] ) ) {
531 return;
532 }
533
534 $optimized_markup = Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
535
536 $instance->add_render_attribute( 'wrapper', 'class', 'elementor-button-wrapper' );
537
538 $instance->add_render_attribute( 'button', 'class', 'elementor-button' );
539
540 if ( ! empty( $settings['link']['url'] ) ) {
541 $instance->add_link_attributes( 'button', $settings['link'] );
542 $instance->add_render_attribute( 'button', 'class', 'elementor-button-link' );
543 } else {
544 $instance->add_render_attribute( 'button', 'role', 'button' );
545 }
546
547 if ( ! empty( $settings['button_css_id'] ) ) {
548 $instance->add_render_attribute( 'button', 'id', $settings['button_css_id'] );
549 }
550
551 if ( ! empty( $settings['size'] ) ) {
552 $instance->add_render_attribute( 'button', 'class', 'elementor-size-' . $settings['size'] );
553 } else {
554 $instance->add_render_attribute( 'button', 'class', 'elementor-size-sm' ); // BC, to make sure the class is always present
555 }
556
557 if ( ! empty( $settings['hover_animation'] ) ) {
558 $instance->add_render_attribute( 'button', 'class', 'elementor-animation-' . $settings['hover_animation'] );
559 }
560 ?>
561 <?php if ( ! $optimized_markup ) : ?>
562 <div <?php $instance->print_render_attribute_string( 'wrapper' ); ?>>
563 <?php endif; ?>
564 <a <?php $instance->print_render_attribute_string( 'button' ); ?>>
565 <?php $this->render_text( $instance ); ?>
566 </a>
567 <?php if ( ! $optimized_markup ) : ?>
568 </div>
569 <?php endif; ?>
570 <?php
571 }
572
573 /**
574 * Render button widget output in the editor.
575 *
576 * Written as a Backbone JavaScript template and used to generate the live preview.
577 *
578 * @since 3.4.0
579 * @access protected
580 */
581 protected function content_template() {
582 ?>
583 <#
584 if ( '' === settings.text && '' === settings.selected_icon.value ) {
585 return;
586 }
587
588 const optimized_markup = elementorCommon.config.experimentalFeatures.e_optimized_markup;
589
590 view.addRenderAttribute( 'wrapper', 'class', 'elementor-button-wrapper' );
591
592 view.addRenderAttribute( 'button', 'class', 'elementor-button' );
593
594 if ( '' !== settings.link.url ) {
595 view.addRenderAttribute( 'button', 'href', elementor.helpers.sanitizeUrl( settings.link.url ) );
596 view.addRenderAttribute( 'button', 'class', 'elementor-button-link' );
597 } else {
598 view.addRenderAttribute( 'button', 'role', 'button' );
599 }
600
601 if ( '' !== settings.button_css_id ) {
602 view.addRenderAttribute( 'button', 'id', settings.button_css_id );
603 }
604
605 if ( '' !== settings.size ) {
606 view.addRenderAttribute( 'button', 'class', 'elementor-size-' + settings.size );
607 }
608
609 if ( '' !== settings.hover_animation ) {
610 view.addRenderAttribute( 'button', 'class', 'elementor-animation-' + settings.hover_animation );
611 }
612
613 view.addRenderAttribute( 'icon', 'class', 'elementor-button-icon' );
614 view.addRenderAttribute( 'text', 'class', 'elementor-button-text' );
615 view.addInlineEditingAttributes( 'text', 'none' );
616 var iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ),
617 migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' );
618 #>
619 <# if ( ! optimized_markup ) { #>
620 <div {{{ view.getRenderAttributeString( 'wrapper' ) }}}>
621 <# } #>
622 <a {{{ view.getRenderAttributeString( 'button' ) }}}>
623 <span class="elementor-button-content-wrapper">
624 <# if ( settings.icon || settings.selected_icon ) { #>
625 <span {{{ view.getRenderAttributeString( 'icon' ) }}}>
626 <# if ( ( migrated || ! settings.icon ) && iconHTML.rendered ) { #>
627 {{{ iconHTML.value }}}
628 <# } else { #>
629 <i class="{{ settings.icon }}" aria-hidden="true"></i>
630 <# } #>
631 </span>
632 <# } #>
633 <# if ( settings.text ) { #>
634 <span {{{ view.getRenderAttributeString( 'text' ) }}}>{{ settings.text }}</span>
635 <# } #>
636 </span>
637 </a>
638 <# if ( ! optimized_markup ) { #>
639 </div>
640 <# } #>
641 <?php
642 }
643
644 /**
645 * Render button text.
646 *
647 * Render button widget text.
648 *
649 * @param \Elementor\Widget_Base|null $instance
650 *
651 * @since 3.4.0
652 * @access protected
653 */
654 protected function render_text( Widget_Base $instance = null ) {
655 // The default instance should be `$this` (a Button widget), unless the Trait is being used from outside of a widget (e.g. `Skin_Base`) which should pass an `$instance`.
656 if ( empty( $instance ) ) {
657 $instance = $this;
658 }
659
660 $settings = $instance->get_settings_for_display();
661
662 $migrated = isset( $settings['__fa4_migrated']['selected_icon'] );
663 $is_new = empty( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
664
665 $instance->add_render_attribute( [
666 'content-wrapper' => [
667 'class' => 'elementor-button-content-wrapper',
668 ],
669 'icon' => [
670 'class' => 'elementor-button-icon',
671 ],
672 'text' => [
673 'class' => 'elementor-button-text',
674 ],
675 ] );
676
677 // TODO: replace the protected with public
678 // $instance->add_inline_editing_attributes( 'text', 'none' );
679 ?>
680 <span <?php $instance->print_render_attribute_string( 'content-wrapper' ); ?>>
681 <?php if ( ! empty( $settings['icon'] ) || ! empty( $settings['selected_icon']['value'] ) ) : ?>
682 <span <?php $instance->print_render_attribute_string( 'icon' ); ?>>
683 <?php if ( $is_new || $migrated ) :
684 Icons_Manager::render_icon( $settings['selected_icon'], [ 'aria-hidden' => 'true' ] );
685 else : ?>
686 <i class="<?php echo esc_attr( $settings['icon'] ); ?>" aria-hidden="true"></i>
687 <?php endif; ?>
688 </span>
689 <?php endif; ?>
690 <?php if ( ! empty( $settings['text'] ) ) : ?>
691 <span <?php $instance->print_render_attribute_string( 'text' ); ?>><?php echo wp_kses_post( $settings['text'] ); ?></span>
692 <?php endif; ?>
693 </span>
694 <?php
695 }
696
697 public function on_import( $element ) {
698 return Icons_Manager::on_import_migration( $element, 'icon', 'selected_icon' );
699 }
700 }
701