| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace UiCoreElements; |
| 3 | 4 | |
| 4 | 5 | use Elementor\Controls_Stack; |
| 5 | 6 | use Elementor\Controls_Manager; |
| @@ -11,33 +12,40 @@ | ||
| 11 | 12 | */ |
| 12 | 13 | class Animate |
| 13 | 14 | { |
| 14 | 15 | |
| 15 | - 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>'; | |
| 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>'; | |
| 16 | 17 | |
| 17 | - public function __construct() { | |
| 18 | - add_action( 'elementor/element/heading/section_title_style/after_section_end', [$this, 'split_animation'],55); | |
| 19 | - add_action( 'elementor/element/highlighted-text/section_title_style/after_section_end', [$this, 'split_animation'],55); | |
| 20 | - add_action( 'elementor/element/text-editor/section_drop_cap/after_section_end', [$this, 'split_animation'],55); | |
| 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); | |
| 21 | 23 | } |
| 22 | 24 | |
| 23 | 25 | static function split_animation(Controls_Stack $widget) |
| 24 | 26 | { |
| 25 | - $widget->start_controls_section( | |
| 26 | - 'section_ui_split_animation', | |
| 27 | - [ | |
| 28 | - 'label' => self::$badge . esc_html__( 'Split Text Animation', 'uicore-elements' ), | |
| 29 | - 'tab' => Controls_Manager::TAB_STYLE, | |
| 30 | - ] | |
| 31 | - ); | |
| 32 | - $widget->add_control( | |
| 33 | - 'important_note', | |
| 34 | - [ | |
| 35 | - 'label' => esc_html__( 'UiCore Animate required', 'uicore-elements' ), | |
| 36 | - 'type' => \Elementor\Controls_Manager::RAW_HTML, | |
| 37 | - 'raw' => __( '<p style="line-height:1.3;margin-top:1em;">Download and instal <a href="https://wordpress.org/plugins/uicore-animate/advanced/" target="_blank">UiCore Animate</a> for more advanced animations control</p>', 'uicore-elements' ), | |
| 38 | - ] | |
| 39 | - ); | |
| 40 | - $widget->end_controls_section(); | |
| 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(); | |
| 41 | 49 | } |
| 42 | 50 | } |
| 43 | -new Animate(); | |
| 51 | +new Animate(); | |