PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.1
Elementor Website Builder – more than just a page builder v3.6.1
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 / controls / exit-animation.php

exit-animation.php in Elementor Website Builder – more than just a page builder 3.6.1, at includes/controls/exit-animation.php

109 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly.
6 }
7
8 /**
9 * Elementor exit animation control.
10 *
11 * A control for creating exit animation. Displays a select box
12 * with the available exit animation effects @see Control_Exit_Animation::get_animations() .
13 *
14 * @since 2.5.0
15 */
16 class Control_Exit_Animation extends Control_Animation {
17
18 /**
19 * Get control type.
20 *
21 * Retrieve the animation control type.
22 *
23 * @since 2.5.0
24 * @access public
25 *
26 * @return string Control type.
27 */
28 public function get_type() {
29 return 'exit_animation';
30 }
31
32 /**
33 * Get animations list.
34 *
35 * Retrieve the list of all the available animations.
36 *
37 * @since 1.0.0
38 * @access public
39 * @static
40 *
41 * @return array Control type.
42 */
43 public static function get_animations() {
44 $animations = [
45 'Fading' => [
46 'fadeIn' => 'Fade Out',
47 'fadeInDown' => 'Fade Out Up',
48 'fadeInLeft' => 'Fade Out Left',
49 'fadeInRight' => 'Fade Out Right',
50 'fadeInUp' => 'Fade Out Down',
51 ],
52 'Zooming' => [
53 'zoomIn' => 'Zoom Out',
54 'zoomInDown' => 'Zoom Out Up',
55 'zoomInLeft' => 'Zoom Out Left',
56 'zoomInRight' => 'Zoom Out Right',
57 'zoomInUp' => 'Zoom Out Down',
58 ],
59 'Sliding' => [
60 'slideInDown' => 'Slide Out Up',
61 'slideInLeft' => 'Slide Out Left',
62 'slideInRight' => 'Slide Out Right',
63 'slideInUp' => 'Slide Out Down',
64 ],
65 'Rotating' => [
66 'rotateIn' => 'Rotate Out',
67 'rotateInDownLeft' => 'Rotate Out Up Left',
68 'rotateInDownRight' => 'Rotate Out Up Right',
69 'rotateInUpRight' => 'Rotate Out Down Left',
70 'rotateInUpLeft' => 'Rotate Out Down Right',
71 ],
72 'Light Speed' => [
73 'lightSpeedIn' => 'Light Speed Out',
74 ],
75 'Specials' => [
76 'rollIn' => 'Roll Out',
77 ],
78 ];
79
80 $additional_animations = [];
81
82 /**
83 * Exit animations.
84 *
85 * Filters the animations list displayed in the exit animations control.
86 *
87 * This hook can be used to register new animations in addition to the
88 * basic Elementor exit animations.
89 *
90 * @since 2.5.0
91 *
92 * @param array $additional_animations Additional animations array.
93 */
94 $additional_animations = apply_filters( 'elementor/controls/exit-animations/additional_animations', $additional_animations );
95
96 return array_merge( $animations, $additional_animations );
97 }
98
99 public static function get_assets( $setting ) {
100 if ( ! $setting || 'none' === $setting ) {
101 return [];
102 }
103
104 return [
105 'styles' => [ 'e-animations' ],
106 ];
107 }
108 }
109