| @@ -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,16 +75,17 @@ | ||
| 95 | 75 | 'Specials' => [ |
| 96 | 76 | 'rollIn' => 'Roll Out', |
| 97 | 77 | ], |
| 98 | 78 | ]; |
| 99 | - } | |
| 100 | 79 | |
| 101 | - public static function get_assets( $setting ) { | |
| 102 | - if ( ! $setting || 'none' === $setting ) { | |
| 103 | - return []; | |
| 104 | - } | |
| 80 | + /** | |
| 81 | + * Element appearance animations list. | |
| 82 | + * | |
| 83 | + * @since 2.5.0 | |
| 84 | + * | |
| 85 | + * @param array $additional_animations Additional Animations array. | |
| 86 | + */ | |
| 87 | + $additional_animations = apply_filters( 'elementor/controls/exit-animations/additional_animations', [] ); | |
| 105 | 88 | |
| 106 | - return [ | |
| 107 | - 'styles' => [ 'e-animation-' . $setting ], | |
| 108 | - ]; | |
| 89 | + return array_merge( $animations, $additional_animations ); | |
| 109 | 90 | } |
| 110 | 91 | } |