| @@ -40,29 +40,9 @@ | ||
| 40 | 40 | * |
| 41 | 41 | * @return array Control type. |
| 42 | 42 | */ |
| 43 | 43 | public static function get_animations() { |
| 44 | - $additional_animations = []; | |
| 45 | - | |
| 46 | - /** | |
| 47 | - * Exit animations. | |
| 48 | - * | |
| 49 | - * Filters the animations list displayed in the exit animations control. | |
| 50 | - * | |
| 51 | - * This hook can be used to register new animations in addition to the | |
| 52 | - * basic Elementor exit animations. | |
| 53 | - * | |
| 54 | - * @since 2.5.0 | |
| 55 | - * | |
| 56 | - * @param array $additional_animations Additional animations array. | |
| 57 | - */ | |
| 58 | - $additional_animations = apply_filters( 'elementor/controls/exit-animations/additional_animations', $additional_animations ); | |
| 59 | - | |
| 60 | - return array_merge( static::get_default_animations(), $additional_animations ); | |
| 61 | - } | |
| 62 | - | |
| 63 | - public static function get_default_animations(): array { | |
| 64 | - return [ | |
| 44 | + $animations = [ | |
| 65 | 45 | 'Fading' => [ |
| 66 | 46 | 'fadeIn' => 'Fade Out', |
| 67 | 47 | 'fadeInDown' => 'Fade Out Up', |
| 68 | 48 | 'fadeInLeft' => 'Fade Out Left', |
| @@ -95,8 +75,26 @@ | ||
| 95 | 75 | 'Specials' => [ |
| 96 | 76 | 'rollIn' => 'Roll Out', |
| 97 | 77 | ], |
| 98 | 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 ); | |
| 99 | 97 | } |
| 100 | 98 | |
| 101 | 99 | public static function get_assets( $setting ) { |
| 102 | 100 | if ( ! $setting || 'none' === $setting ) { |
| @@ -103,8 +101,8 @@ | ||
| 103 | 101 | return []; |
| 104 | 102 | } |
| 105 | 103 | |
| 106 | 104 | return [ |
| 107 | - 'styles' => [ 'e-animation-' . $setting ], | |
| 105 | + 'styles' => [ 'e-animations' ], | |
| 108 | 106 | ]; |
| 109 | 107 | } |
| 110 | 108 | } |