| @@ -136,30 +136,11 @@ | ||
| 136 | 136 | * |
| 137 | 137 | * @return object |
| 138 | 138 | */ |
| 139 | 139 | private function get_public_scripts() { |
| 140 | - | |
| 141 | - $default_swiper_path = rtsb()->get_assets_uri( 'vendor/swiper/js/swiper-bundle.min.js' ); | |
| 142 | - | |
| 143 | - if ( defined( 'ELEMENTOR_ASSETS_PATH' ) ) { | |
| 144 | - $is_swiper8_enable = get_option( 'elementor_experiment-e_swiper_latest' ); | |
| 145 | - | |
| 146 | - if ( 'active' === $is_swiper8_enable || 'default' === $is_swiper8_enable ) { | |
| 147 | - $el_swiper_path = 'lib/swiper/v8/swiper.min.js'; | |
| 148 | - } else { | |
| 149 | - $el_swiper_path = 'lib/swiper/swiper.min.js'; | |
| 150 | - } | |
| 151 | - | |
| 152 | - $elementor_swiper_path = ELEMENTOR_ASSETS_PATH . $el_swiper_path; | |
| 153 | - | |
| 154 | - if ( file_exists( $elementor_swiper_path ) ) { | |
| 155 | - $default_swiper_path = ELEMENTOR_ASSETS_URL . $el_swiper_path; | |
| 156 | - } | |
| 157 | - } | |
| 158 | - | |
| 159 | 140 | $this->scripts[] = [ |
| 160 | 141 | 'handle' => 'swiper', |
| 161 | - 'src' => esc_url( $default_swiper_path ), | |
| 142 | + 'src' => rtsb()->get_assets_uri( 'vendor/swiper/js/swiper-bundle.min.js' ), | |
| 162 | 143 | 'deps' => [ 'jquery' ], |
| 163 | 144 | 'footer' => true, |
| 164 | 145 | ]; |
| 165 | 146 | |
| @@ -346,9 +327,9 @@ | ||
| 346 | 327 | /** |
| 347 | 328 | * Styles. |
| 348 | 329 | */ |
| 349 | 330 | wp_register_style( 'rtsb-admin-app', rtsb()->get_assets_uri( 'css/backend/admin-settings.css' ), '', $this->version ); |
| 350 | - // wp_register_style( 'rtsb-admin-global', rtsb()->get_assets_uri( 'css/backend/admin-global.css' ), '', $this->version ); | |
| 331 | + wp_register_style( 'rtsb-admin-global', rtsb()->get_assets_uri( 'css/backend/admin-global.css' ), '', $this->version ); | |
| 351 | 332 | wp_register_style( 'rtsb-templatebuilder', rtsb()->get_assets_uri( 'css/backend/template-builder.css' ), '', $this->version ); |
| 352 | 333 | |
| 353 | 334 | /** |
| 354 | 335 | * Scripts. |
| @@ -365,19 +346,10 @@ | ||
| 365 | 346 | * |
| 366 | 347 | * @return void |
| 367 | 348 | */ |
| 368 | 349 | public function enqueue_backend_scripts( $hook ) { |
| 369 | - ob_start(); ?> | |
| 370 | - #adminmenu .toplevel_page_rtsb .wp-menu-image img { | |
| 371 | - width: auto; | |
| 372 | - height: 22px; | |
| 373 | - padding: 4px 0; | |
| 374 | - } | |
| 375 | - <?php | |
| 376 | - $admin_global_style = ob_get_clean(); | |
| 377 | - // Speed Optimization. | |
| 378 | - wp_add_inline_style( 'admin-menu', $admin_global_style ); | |
| 379 | - // wp_enqueue_style( 'rtsb-admin-global' ); | |
| 350 | + | |
| 351 | + wp_enqueue_style( 'rtsb-admin-global' ); | |
| 380 | 352 | |
| 381 | 353 | global $pagenow; |
| 382 | 354 | |
| 383 | 355 | if ( 'admin.php' === $pagenow && ! empty( $_GET['page'] ) && 'rtsb-settings' === $_GET['page'] ) { |