PluginProbe
Elementor Website Builder – more than just a page builder / 3.21.3
Elementor Website Builder – more than just a page builder v3.21.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
← All changes | includes/controls/hover-animation.php +32 -36 4.2.0-dev23.21.3 View file →
@@ -24,9 +24,9 @@
24 24 * @static
25 25 *
26 26 * @var array
27 27 */
28 - protected static $_animations;
28 + private static $_animations;
29 29
30 30 /**
31 31 * Get hover animation control type.
32 32 *
@@ -53,9 +53,37 @@
53 53 * @return array Available hover animation.
54 54 */
55 55 public static function get_animations() {
56 56 if ( is_null( self::$_animations ) ) {
57 - self::$_animations = self::get_default_animations();
57 + self::$_animations = [
58 + 'grow' => 'Grow',
59 + 'shrink' => 'Shrink',
60 + 'pulse' => 'Pulse',
61 + 'pulse-grow' => 'Pulse Grow',
62 + 'pulse-shrink' => 'Pulse Shrink',
63 + 'push' => 'Push',
64 + 'pop' => 'Pop',
65 + 'bounce-in' => 'Bounce In',
66 + 'bounce-out' => 'Bounce Out',
67 + 'rotate' => 'Rotate',
68 + 'grow-rotate' => 'Grow Rotate',
69 + 'float' => 'Float',
70 + 'sink' => 'Sink',
71 + 'bob' => 'Bob',
72 + 'hang' => 'Hang',
73 + 'skew' => 'Skew',
74 + 'skew-forward' => 'Skew Forward',
75 + 'skew-backward' => 'Skew Backward',
76 + 'wobble-vertical' => 'Wobble Vertical',
77 + 'wobble-horizontal' => 'Wobble Horizontal',
78 + 'wobble-to-bottom-right' => 'Wobble To Bottom Right',
79 + 'wobble-to-top-right' => 'Wobble To Top Right',
80 + 'wobble-top' => 'Wobble Top',
81 + 'wobble-bottom' => 'Wobble Bottom',
82 + 'wobble-skew' => 'Wobble Skew',
83 + 'buzz' => 'Buzz',
84 + 'buzz-out' => 'Buzz Out',
85 + ];
58 86
59 87 $additional_animations = [];
60 88
61 89 /**
@@ -77,40 +105,8 @@
77 105
78 106 return self::$_animations;
79 107 }
80 108
81 - public static function get_default_animations(): array {
82 - return [
83 - 'grow' => 'Grow',
84 - 'shrink' => 'Shrink',
85 - 'pulse' => 'Pulse',
86 - 'pulse-grow' => 'Pulse Grow',
87 - 'pulse-shrink' => 'Pulse Shrink',
88 - 'push' => 'Push',
89 - 'pop' => 'Pop',
90 - 'bounce-in' => 'Bounce In',
91 - 'bounce-out' => 'Bounce Out',
92 - 'rotate' => 'Rotate',
93 - 'grow-rotate' => 'Grow Rotate',
94 - 'float' => 'Float',
95 - 'sink' => 'Sink',
96 - 'bob' => 'Bob',
97 - 'hang' => 'Hang',
98 - 'skew' => 'Skew',
99 - 'skew-forward' => 'Skew Forward',
100 - 'skew-backward' => 'Skew Backward',
101 - 'wobble-vertical' => 'Wobble Vertical',
102 - 'wobble-horizontal' => 'Wobble Horizontal',
103 - 'wobble-to-bottom-right' => 'Wobble To Bottom Right',
104 - 'wobble-to-top-right' => 'Wobble To Top Right',
105 - 'wobble-top' => 'Wobble Top',
106 - 'wobble-bottom' => 'Wobble Bottom',
107 - 'wobble-skew' => 'Wobble Skew',
108 - 'buzz' => 'Buzz',
109 - 'buzz-out' => 'Buzz Out',
110 - ];
111 - }
112 -
113 109 /**
114 110 * Render hover animation control output in the editor.
115 111 *
116 112 * Used to generate the control HTML in the editor using Underscore JS
@@ -126,9 +122,9 @@
126 122 <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label>
127 123 <div class="elementor-control-input-wrapper">
128 124 <select id="<?php $this->print_control_uid(); ?>" data-setting="{{ data.name }}">
129 125 <option value=""><?php echo esc_html__( 'None', 'elementor' ); ?></option>
130 - <?php foreach ( static::get_animations() as $animation_name => $animation_title ) : ?>
126 + <?php foreach ( self::get_animations() as $animation_name => $animation_title ) : ?>
131 127 <option value="<?php Utils::print_unescaped_internal_string( $animation_name ); ?>"><?php Utils::print_unescaped_internal_string( $animation_title ); ?></option>
132 128 <?php endforeach; ?>
133 129 </select>
134 130 </div>
@@ -161,8 +157,8 @@
161 157 return [];
162 158 }
163 159
164 160 return [
165 - 'styles' => [ 'e-animation-' . $setting ],
161 + 'styles' => [ 'e-animations' ],
166 162 ];
167 163 }
168 164 }