| @@ -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 |
| @@ -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 | } |