PluginProbe
UiCore Elements – Free widgets and templates for Elementor / trunk
UiCore Elements – Free widgets and templates for Elementor vtrunk
1.3.16 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 All 40 releases
uicore-elements / includes / class-animate.php

class-animate.php in UiCore Elements – Free widgets and templates for Elementor trunk, at includes/class-animate.php

52 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace UiCoreElements;
4
5 use Elementor\Controls_Stack;
6 use Elementor\Controls_Manager;
7
8 defined('ABSPATH') || exit();
9
10 /**
11 * Replace UiCore Animate Plugin
12 */
13 class Animate
14 {
15
16 private static $badge = '<span title="Powerd by UiCore Animate" style="font-size: 11px; text-transform: uppercase; background: #5dbad8; color: black; padding: 2px 5px; border-radius: 3px; margin-right: 7px;">Animate</span>';
17
18 public function __construct()
19 {
20 add_action('elementor/element/heading/section_title_style/after_section_end', [$this, 'split_animation'], 55);
21 add_action('elementor/element/highlighted-text/section_title_style/after_section_end', [$this, 'split_animation'], 55);
22 add_action('elementor/element/text-editor/section_drop_cap/after_section_end', [$this, 'split_animation'], 55);
23 }
24
25 static function split_animation(Controls_Stack $widget)
26 {
27 $widget->start_controls_section(
28 'section_ui_split_animation',
29 [
30 'label' => self::$badge . esc_html__('Split Text Animation', 'uicore-elements'),
31 'tab' => Controls_Manager::TAB_STYLE,
32 ]
33 );
34 $widget->add_control(
35 'important_note',
36 [
37 'label' => esc_html__('UiCore Animate required', 'uicore-elements'),
38 'type' => \Elementor\Controls_Manager::RAW_HTML,
39 'raw' => '<p style="line-height:1.3;margin-top:1em;">'
40 . sprintf(
41 /* translators: %s: link to Uicore Animate */
42 __('Download and instal %s for more advanced animations control', 'uicore-elements'),
43 '<a href="https://wordpress.org/plugins/uicore-animate/advanced/" target="_blank"> Uicore Animate</a>'
44 )
45 . '</p>',
46 ]
47 );
48 $widget->end_controls_section();
49 }
50 }
51 new Animate();
52