PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.4
Elementor Website Builder – more than just a page builder v3.0.4
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/animation.php +19 -37 4.1.13.0.4 View file →
@@ -58,29 +58,9 @@
58 58 *
59 59 * @return array Control type.
60 60 */
61 61 public static function get_animations() {
62 - $additional_animations = [];
63 -
64 - /**
65 - * Entrance animations.
66 - *
67 - * Filters the animations list displayed in the animations control.
68 - *
69 - * This hook can be used to register animations in addition to the
70 - * basic Elementor animations.
71 - *
72 - * @since 2.4.0
73 - *
74 - * @param array $additional_animations Additional animations array.
75 - */
76 - $additional_animations = apply_filters( 'elementor/controls/animations/additional_animations', $additional_animations );
77 -
78 - return array_merge( static::get_default_animations(), $additional_animations );
79 - }
80 -
81 - public static function get_default_animations() {
82 - return [
62 + $animations = [
83 63 'Fading' => [
84 64 'fadeIn' => 'Fade In',
85 65 'fadeInDown' => 'Fade In Down',
86 66 'fadeInLeft' => 'Fade In Left',
@@ -132,8 +112,19 @@
132 112 'Specials' => [
133 113 'rollIn' => 'Roll In',
134 114 ],
135 115 ];
116 +
117 + /**
118 + * Element appearance animations list.
119 + *
120 + * @since 2.4.0
121 + *
122 + * @param array $additional_animations Additional Animations array.
123 + */
124 + $additional_animations = apply_filters( 'elementor/controls/animations/additional_animations', [] );
125 +
126 + return array_merge( $animations, $additional_animations );
136 127 }
137 128
138 129 /**
139 130 * Render animations control template.
@@ -145,19 +136,20 @@
145 136 * @since 1.0.0
146 137 * @access public
147 138 */
148 139 public function content_template() {
140 + $control_uid = $this->get_control_uid();
149 141 ?>
150 142 <div class="elementor-control-field">
151 - <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label>
143 + <label for="<?php echo $control_uid; ?>" class="elementor-control-title">{{{ data.label }}}</label>
152 144 <div class="elementor-control-input-wrapper">
153 - <select id="<?php $this->print_control_uid(); ?>" data-setting="{{ data.name }}">
154 - <option value=""><?php echo esc_html__( 'Default', 'elementor' ); ?></option>
155 - <option value="none"><?php echo esc_html__( 'None', 'elementor' ); ?></option>
145 + <select id="<?php echo $control_uid; ?>" data-setting="{{ data.name }}">
146 + <option value=""><?php echo __( 'Default', 'elementor' ); ?></option>
147 + <option value="none"><?php echo __( 'None', 'elementor' ); ?></option>
156 148 <?php foreach ( static::get_animations() as $animations_group_name => $animations_group ) : ?>
157 - <optgroup label="<?php echo esc_attr( $animations_group_name ); ?>">
149 + <optgroup label="<?php echo $animations_group_name; ?>">
158 150 <?php foreach ( $animations_group as $animation_name => $animation_title ) : ?>
159 - <option value="<?php echo esc_attr( $animation_name ); ?>"><?php echo esc_html( $animation_title ); ?></option>
151 + <option value="<?php echo $animation_name; ?>"><?php echo $animation_title; ?></option>
160 152 <?php endforeach; ?>
161 153 </optgroup>
162 154 <?php endforeach; ?>
163 155 </select>
@@ -166,16 +158,6 @@
166 158 <# if ( data.description ) { #>
167 159 <div class="elementor-control-field-description">{{{ data.description }}}</div>
168 160 <# } #>
169 161 <?php
170 - }
171 -
172 - public static function get_assets( $setting ) {
173 - if ( ! $setting || 'none' === $setting ) {
174 - return [];
175 - }
176 -
177 - return [
178 - 'styles' => [ 'e-animation-' . $setting ],
179 - ];
180 162 }
181 163 }