| @@ -7,9 +7,9 @@ | ||
| 7 | 7 | use Elementor\Control_Exit_Animation; |
| 8 | 8 | use Elementor\Control_Hover_Animation; |
| 9 | 9 | |
| 10 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | - exit; // Exit if accessed directly. | |
| 11 | + exit; // Exit if accessed directly | |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * Elementor assets loader. |
| @@ -46,10 +46,10 @@ | ||
| 46 | 46 | 'version' => ELEMENTOR_VERSION, |
| 47 | 47 | 'dependencies' => [ 'swiper' ], |
| 48 | 48 | ], |
| 49 | 49 | 'swiper' => [ |
| 50 | - 'src' => $this->get_css_assets_url( 'swiper', 'assets/lib/swiper/v8/css/' ), | |
| 51 | - 'version' => '8.4.5', | |
| 50 | + 'src' => $this->get_css_assets_url( 'swiper', $this->getSwiperPath() ), | |
| 51 | + 'version' => $this->getSwiperVersion(), | |
| 52 | 52 | 'dependencies' => [], |
| 53 | 53 | ], |
| 54 | 54 | ]; |
| 55 | 55 | |
| @@ -55,8 +55,16 @@ | ||
| 55 | 55 | |
| 56 | 56 | return array_merge( $styles, $this->get_animation_styles() ); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + private function getSwiperPath(): string { | |
| 60 | + return 'assets/lib/swiper/v8/css/'; | |
| 61 | + } | |
| 62 | + | |
| 63 | + private function getSwiperVersion(): string { | |
| 64 | + return '8.4.5'; | |
| 65 | + } | |
| 66 | + | |
| 59 | 67 | private function get_animations(): array { |
| 60 | 68 | $grouped_animations = Control_Animation::get_default_animations(); |
| 61 | 69 | $grouped_animations['hover'] = Control_Hover_Animation::get_default_animations(); |
| 62 | 70 | $exit_animations = Control_Exit_Animation::get_default_animations(); |
| @@ -99,9 +107,9 @@ | ||
| 99 | 107 | return $this->assets; |
| 100 | 108 | } |
| 101 | 109 | |
| 102 | 110 | /** |
| 103 | - * @param array $assets_data { | |
| 111 | + * @param array $assets { | |
| 104 | 112 | * @type array 'styles' |
| 105 | 113 | * @type array 'scripts' |
| 106 | 114 | * } |
| 107 | 115 | */ |