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

702 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 /* translators: 1: `<code>` opening tag, 2: `</code>` closing tag. */
217 esc_html__( 'Please make sure the ID is unique and not used elsewhere on the page. This field allows %1$sA-z 0-9%2$s & underscore chars without spaces.', 'elementor' ),
218 '<code>',
219 '</code>'
220 ),
221 'separator' => 'before',
222 'condition' => $args['section_condition'],
223 ]
224 );
225 }
226
227 /**
228 * @since 3.4.0
229 *
230 * @param array $args {
231 * An array of values for the button adjustments.
232 *
233 * @type array $section_condition Set of conditions to hide the controls.
234 * @type string $alignment_default Default position for the button.
235 * @type string $alignment_control_prefix_class Prefix class name for the button position control.
236 * @type string $content_alignment_default Default alignment for the button content.
237 * }
238 */
239 protected function register_button_style_controls( $args = [] ) {
240 $default_args = [
241 'section_condition' => [],
242 'alignment_default' => '',
243 'alignment_control_prefix_class' => 'elementor%s-align-',
244 'content_alignment_default' => '',
245 ];
246
247 $args = wp_parse_args( $args, $default_args );
248
249 $this->add_responsive_control(
250 'align',
251 [
252 'label' => esc_html__( 'Position', 'elementor' ),
253 'type' => Controls_Manager::CHOOSE,
254 'options' => [
255 'left' => [
256 'title' => esc_html__( 'Left', 'elementor' ),
257 'icon' => 'eicon-h-align-left',
258 ],
259 'center' => [
260 'title' => esc_html__( 'Center', 'elementor' ),
261 'icon' => 'eicon-h-align-center',
262 ],
263 'right' => [
264 'title' => esc_html__( 'Right', 'elementor' ),
265 'icon' => 'eicon-h-align-right',
266 ],
267 'justify' => [
268 'title' => esc_html__( 'Stretch', 'elementor' ),
269 'icon' => 'eicon-h-align-stretch',
270 ],
271 ],
272 'prefix_class' => $args['alignment_control_prefix_class'],
273 'default' => $args['alignment_default'],
274 'condition' => $args['section_condition'],
275 ]
276 );
277
278 $start = is_rtl() ? 'right' : 'left';
279 $end = is_rtl() ? 'left' : 'right';
280
281 $this->add_responsive_control(
282 'content_align',
283 [
284 'label' => esc_html__( 'Alignment', 'elementor' ),
285 'type' => Controls_Manager::CHOOSE,
286 'options' => [
287 'start' => [
288 'title' => esc_html__( 'Start', 'elementor' ),
289 'icon' => "eicon-text-align-{$start}",
290 ],
291 'center' => [
292 'title' => esc_html__( 'Center', 'elementor' ),
293 'icon' => 'eicon-text-align-center',
294 ],
295 'end' => [
296 'title' => esc_html__( 'End', 'elementor' ),
297 'icon' => "eicon-text-align-{$end}",
298 ],
299 'space-between' => [
300 'title' => esc_html__( 'Space between', 'elementor' ),
301 'icon' => 'eicon-text-align-justify',
302 ],
303 ],
304 'default' => $args['content_alignment_default'],
305 'selectors' => [
306 '{{WRAPPER}} .elementor-button .elementor-button-content-wrapper' => 'justify-content: {{VALUE}};',
307 ],
308 'condition' => array_merge( $args['section_condition'], [ 'align' => 'justify' ] ),
309 ]
310 );
311
312 $this->add_group_control(
313 Group_Control_Typography::get_type(),
314 [
315 'name' => 'typography',
316 'global' => [
317 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
318 ],
319 'selector' => '{{WRAPPER}} .elementor-button',
320 'condition' => $args['section_condition'],
321 ]
322 );
323
324 $this->add_group_control(
325 Group_Control_Text_Shadow::get_type(),
326 [
327 'name' => 'text_shadow',
328 'selector' => '{{WRAPPER}} .elementor-button',
329 'condition' => $args['section_condition'],
330 ]
331 );
332
333 $this->start_controls_tabs( 'tabs_button_style', [
334 'condition' => $args['section_condition'],
335 ] );
336
337 $this->start_controls_tab(
338 'tab_button_normal',
339 [
340 'label' => esc_html__( 'Normal', 'elementor' ),
341 'condition' => $args['section_condition'],
342 ]
343 );
344
345 $this->add_control(
346 'button_text_color',
347 [
348 'label' => esc_html__( 'Text Color', 'elementor' ),
349 'type' => Controls_Manager::COLOR,
350 'default' => '',
351 'selectors' => [
352 '{{WRAPPER}} .elementor-button' => 'fill: {{VALUE}}; color: {{VALUE}};',
353 ],
354 'condition' => $args['section_condition'],
355 ]
356 );
357
358 $this->add_group_control(
359 Group_Control_Background::get_type(),
360 [
361 'name' => 'background',
362 'types' => [ 'classic', 'gradient' ],
363 'exclude' => [ 'image' ],
364 'selector' => '{{WRAPPER}} .elementor-button',
365 'fields_options' => [
366 'background' => [
367 'default' => 'classic',
368 ],
369 'color' => [
370 'global' => [
371 'default' => Global_Colors::COLOR_ACCENT,
372 ],
373 ],
374 ],
375 'condition' => $args['section_condition'],
376 ]
377 );
378
379 $this->add_group_control(
380 Group_Control_Box_Shadow::get_type(),
381 [
382 'name' => 'button_box_shadow',
383 'selector' => '{{WRAPPER}} .elementor-button',
384 'condition' => $args['section_condition'],
385 ]
386 );
387
388 $this->end_controls_tab();
389
390 $this->start_controls_tab(
391 'tab_button_hover',
392 [
393 'label' => esc_html__( 'Hover', 'elementor' ),
394 'condition' => $args['section_condition'],
395 ]
396 );
397
398 $this->add_control(
399 'hover_color',
400 [
401 'label' => esc_html__( 'Text Color', 'elementor' ),
402 'type' => Controls_Manager::COLOR,
403 'selectors' => [
404 '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus' => 'color: {{VALUE}};',
405 '{{WRAPPER}} .elementor-button:hover svg, {{WRAPPER}} .elementor-button:focus svg' => 'fill: {{VALUE}};',
406 ],
407 'condition' => $args['section_condition'],
408 ]
409 );
410
411 $this->add_group_control(
412 Group_Control_Background::get_type(),
413 [
414 'name' => 'button_background_hover',
415 'types' => [ 'classic', 'gradient' ],
416 'exclude' => [ 'image' ],
417 'selector' => '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus',
418 'fields_options' => [
419 'background' => [
420 'default' => 'classic',
421 ],
422 ],
423 'condition' => $args['section_condition'],
424 ]
425 );
426
427 $this->add_control(
428 'button_hover_border_color',
429 [
430 'label' => esc_html__( 'Border Color', 'elementor' ),
431 'type' => Controls_Manager::COLOR,
432 'selectors' => [
433 '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus' => 'border-color: {{VALUE}};',
434 ],
435 'condition' => $args['section_condition'],
436 ]
437 );
438
439 $this->add_group_control(
440 Group_Control_Box_Shadow::get_type(),
441 [
442 'name' => 'button_hover_box_shadow',
443 'selector' => '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus',
444 'condition' => $args['section_condition'],
445 ]
446 );
447
448 $this->add_control(
449 'button_hover_transition_duration',
450 [
451 'label' => esc_html__( 'Transition Duration', 'elementor' ),
452 'type' => Controls_Manager::SLIDER,
453 'size_units' => [ 's', 'ms', 'custom' ],
454 'default' => [
455 'unit' => 's',
456 ],
457 'selectors' => [
458 '{{WRAPPER}} .elementor-button' => 'transition-duration: {{SIZE}}{{UNIT}};',
459 ],
460 ]
461 );
462
463 $this->add_control(
464 'hover_animation',
465 [
466 'label' => esc_html__( 'Hover Animation', 'elementor' ),
467 'type' => Controls_Manager::HOVER_ANIMATION,
468 'condition' => $args['section_condition'],
469 ]
470 );
471
472 $this->end_controls_tab();
473
474 $this->end_controls_tabs();
475
476 $this->add_group_control(
477 Group_Control_Border::get_type(),
478 [
479 'name' => 'border',
480 'selector' => '{{WRAPPER}} .elementor-button',
481 'separator' => 'before',
482 'condition' => $args['section_condition'],
483 ]
484 );
485
486 $this->add_responsive_control(
487 'border_radius',
488 [
489 'label' => esc_html__( 'Border Radius', 'elementor' ),
490 'type' => Controls_Manager::DIMENSIONS,
491 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
492 'selectors' => [
493 '{{WRAPPER}} .elementor-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
494 ],
495 'condition' => $args['section_condition'],
496 ]
497 );
498
499 $this->add_responsive_control(
500 'text_padding',
501 [
502 'label' => esc_html__( 'Padding', 'elementor' ),
503 'type' => Controls_Manager::DIMENSIONS,
504 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
505 'selectors' => [
506 '{{WRAPPER}} .elementor-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
507 ],
508 'separator' => 'before',
509 'condition' => $args['section_condition'],
510 ]
511 );
512 }
513
514 /**
515 * Render button widget output on the frontend.
516 *
517 * Written in PHP and used to generate the final HTML.
518 *
519 * @param \Elementor\Widget_Base|null $instance
520 *
521 * @since 3.4.0
522 * @access protected
523 */
524 protected function render_button( ?Widget_Base $instance = null ) {
525 if ( empty( $instance ) ) {
526 $instance = $this;
527 }
528
529 $settings = $instance->get_settings_for_display();
530
531 if ( empty( $settings['text'] ) && empty( $settings['selected_icon']['value'] ) ) {
532 return;
533 }
534
535 $optimized_markup = Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
536
537 $instance->add_render_attribute( 'wrapper', 'class', 'elementor-button-wrapper' );
538
539 $instance->add_render_attribute( 'button', 'class', 'elementor-button' );
540
541 if ( ! empty( $settings['link']['url'] ) ) {
542 $instance->add_link_attributes( 'button', $settings['link'] );
543 $instance->add_render_attribute( 'button', 'class', 'elementor-button-link' );
544 } else {
545 $instance->add_render_attribute( 'button', 'role', 'button' );
546 }
547
548 if ( ! empty( $settings['button_css_id'] ) ) {
549 $instance->add_render_attribute( 'button', 'id', $settings['button_css_id'] );
550 }
551
552 if ( ! empty( $settings['size'] ) ) {
553 $instance->add_render_attribute( 'button', 'class', 'elementor-size-' . $settings['size'] );
554 } else {
555 $instance->add_render_attribute( 'button', 'class', 'elementor-size-sm' ); // BC, to make sure the class is always present
556 }
557
558 if ( ! empty( $settings['hover_animation'] ) ) {
559 $instance->add_render_attribute( 'button', 'class', 'elementor-animation-' . $settings['hover_animation'] );
560 }
561 ?>
562 <?php if ( ! $optimized_markup ) : ?>
563 <div <?php $instance->print_render_attribute_string( 'wrapper' ); ?>>
564 <?php endif; ?>
565 <a <?php $instance->print_render_attribute_string( 'button' ); ?>>
566 <?php $this->render_text( $instance ); ?>
567 </a>
568 <?php if ( ! $optimized_markup ) : ?>
569 </div>
570 <?php endif; ?>
571 <?php
572 }
573
574 /**
575 * Render button widget output in the editor.
576 *
577 * Written as a Backbone JavaScript template and used to generate the live preview.
578 *
579 * @since 3.4.0
580 * @access protected
581 */
582 protected function content_template() {
583 ?>
584 <#
585 if ( '' === settings.text && '' === settings.selected_icon.value ) {
586 return;
587 }
588
589 const optimized_markup = elementorCommon.config.experimentalFeatures.e_optimized_markup;
590
591 view.addRenderAttribute( 'wrapper', 'class', 'elementor-button-wrapper' );
592
593 view.addRenderAttribute( 'button', 'class', 'elementor-button' );
594
595 if ( '' !== settings.link?.url ) {
596 view.addRenderAttribute( 'button', 'href', elementor.helpers.sanitizeUrl( settings.link?.url ) );
597 view.addRenderAttribute( 'button', 'class', 'elementor-button-link' );
598 } else {
599 view.addRenderAttribute( 'button', 'role', 'button' );
600 }
601
602 if ( '' !== settings.button_css_id ) {
603 view.addRenderAttribute( 'button', 'id', settings.button_css_id );
604 }
605
606 if ( '' !== settings.size ) {
607 view.addRenderAttribute( 'button', 'class', 'elementor-size-' + settings.size );
608 }
609
610 if ( '' !== settings.hover_animation ) {
611 view.addRenderAttribute( 'button', 'class', 'elementor-animation-' + settings.hover_animation );
612 }
613
614 view.addRenderAttribute( 'icon', 'class', 'elementor-button-icon' );
615 view.addRenderAttribute( 'text', 'class', 'elementor-button-text' );
616 view.addInlineEditingAttributes( 'text', 'none' );
617 var iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ),
618 migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' );
619 #>
620 <# if ( ! optimized_markup ) { #>
621 <div {{{ view.getRenderAttributeString( 'wrapper' ) }}}>
622 <# } #>
623 <a {{{ view.getRenderAttributeString( 'button' ) }}}>
624 <span class="elementor-button-content-wrapper">
625 <# if ( settings.icon || settings.selected_icon ) { #>
626 <span {{{ view.getRenderAttributeString( 'icon' ) }}}>
627 <# if ( ( migrated || ! settings.icon ) && iconHTML.rendered ) { #>
628 {{{ iconHTML.value }}}
629 <# } else { #>
630 <i class="{{ settings.icon }}" aria-hidden="true"></i>
631 <# } #>
632 </span>
633 <# } #>
634 <# if ( settings.text ) { #>
635 <span {{{ view.getRenderAttributeString( 'text' ) }}}>{{ settings.text }}</span>
636 <# } #>
637 </span>
638 </a>
639 <# if ( ! optimized_markup ) { #>
640 </div>
641 <# } #>
642 <?php
643 }
644
645 /**
646 * Render button text.
647 *
648 * Render button widget text.
649 *
650 * @param \Elementor\Widget_Base|null $instance
651 *
652 * @since 3.4.0
653 * @access protected
654 */
655 protected function render_text( ?Widget_Base $instance = null ) {
656 // 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`.
657 if ( empty( $instance ) ) {
658 $instance = $this;
659 }
660
661 $settings = $instance->get_settings_for_display();
662
663 $migrated = isset( $settings['__fa4_migrated']['selected_icon'] );
664 $is_new = empty( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
665
666 $instance->add_render_attribute( [
667 'content-wrapper' => [
668 'class' => 'elementor-button-content-wrapper',
669 ],
670 'icon' => [
671 'class' => 'elementor-button-icon',
672 ],
673 'text' => [
674 'class' => 'elementor-button-text',
675 ],
676 ] );
677
678 // TODO: replace the protected with public
679 // $instance->add_inline_editing_attributes( 'text', 'none' );
680 ?>
681 <span <?php $instance->print_render_attribute_string( 'content-wrapper' ); ?>>
682 <?php if ( ! empty( $settings['icon'] ) || ! empty( $settings['selected_icon']['value'] ) ) : ?>
683 <span <?php $instance->print_render_attribute_string( 'icon' ); ?>>
684 <?php if ( $is_new || $migrated ) :
685 Icons_Manager::render_icon( $settings['selected_icon'], [ 'aria-hidden' => 'true' ] );
686 else : ?>
687 <i class="<?php echo esc_attr( $settings['icon'] ); ?>" aria-hidden="true"></i>
688 <?php endif; ?>
689 </span>
690 <?php endif; ?>
691 <?php if ( ! empty( $settings['text'] ) ) : ?>
692 <span <?php $instance->print_render_attribute_string( 'text' ); ?>><?php echo wp_kses_post( $settings['text'] ); ?></span>
693 <?php endif; ?>
694 </span>
695 <?php
696 }
697
698 public function on_import( $element ) {
699 return Icons_Manager::on_import_migration( $element, 'icon', 'selected_icon' );
700 }
701 }
702