| @@ -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,26 @@ | ||
| 132 | 112 | 'Specials' => [ |
| 133 | 113 | 'rollIn' => 'Roll In', |
| 134 | 114 | ], |
| 135 | 115 | ]; |
| 116 | + | |
| 117 | + $additional_animations = []; | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * Entrance animations. | |
| 121 | + * | |
| 122 | + * Filters the animations list displayed in the animations control. | |
| 123 | + * | |
| 124 | + * This hook can be used to register animations in addition to the | |
| 125 | + * basic Elementor animations. | |
| 126 | + * | |
| 127 | + * @since 2.4.0 | |
| 128 | + * | |
| 129 | + * @param array $additional_animations Additional animations array. | |
| 130 | + */ | |
| 131 | + $additional_animations = apply_filters( 'elementor/controls/animations/additional_animations', $additional_animations ); | |
| 132 | + | |
| 133 | + return array_merge( $animations, $additional_animations ); | |
| 136 | 134 | } |
| 137 | 135 | |
| 138 | 136 | /** |
| 139 | 137 | * Render animations control template. |
| @@ -174,8 +172,8 @@ | ||
| 174 | 172 | return []; |
| 175 | 173 | } |
| 176 | 174 | |
| 177 | 175 | return [ |
| 178 | - 'styles' => [ 'e-animation-' . $setting ], | |
| 176 | + 'styles' => [ 'e-animations' ], | |
| 179 | 177 | ]; |
| 180 | 178 | } |
| 181 | 179 | } |