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

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