PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.2
ShopBuilder – WooCommerce Builder For Elementor v2.0.2
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Controllers/AssetsController.php +17 -53 2.1.112.0.2 View file →
@@ -86,9 +86,9 @@
86 86 *
87 87 * @return object
88 88 */
89 89 private function get_public_styles() {
90 - $rtl_suffix = is_rtl() ? '-rtl' : '';
90 + $rtl_suffix = is_rtl() ? '-rtl' : '';
91 91 $this->styles[] = [
92 92 'handle' => 'rtsb-fonts',
93 93 'src' => rtsb()->get_assets_uri( 'css/frontend/rtsb-fonts.css' ),
94 94 ];
@@ -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
@@ -322,20 +303,18 @@
322 303 wp_localize_script(
323 304 'rtsb-public',
324 305 'rtsbPublicParams',
325 306 [
326 - 'ajaxUrl' => esc_url( self::$ajaxurl ),
327 - 'homeurl' => home_url(),
328 - 'wcCartUrl' => wc_get_cart_url(),
329 - 'addedToCartText' => esc_html__( 'Product Added', 'shopbuilder' ),
330 - 'singleCartToastrText' => esc_html__( 'Successfully Added', 'shopbuilder' ),
331 - 'singleCartBtnText' => apply_filters( 'rtsb/global/single_add_to_cart_success', esc_html__( 'Added to Cart', 'shopbuilder' ) ),
332 - 'browseCartText' => esc_html__( 'Browse Cart', 'shopbuilder' ),
333 - 'noProductsText' => apply_filters( 'rtsb/global/no_products_text', esc_html__( 'No more products to load', 'shopbuilder' ) ),
334 - 'notice' => [
307 + 'ajaxUrl' => esc_url( self::$ajaxurl ),
308 + 'homeurl' => home_url(),
309 + 'wcCartUrl' => wc_get_cart_url(),
310 + 'addedToCartText' => esc_html__( 'Product Added', 'shopbuilder' ),
311 + 'browseCartText' => esc_html__( 'Browse Cart', 'shopbuilder' ),
312 + 'noProductsText' => apply_filters( 'rtsb/global/no_products_text', esc_html__( 'No more products to load', 'shopbuilder' ) ),
313 + 'notice' => [
335 314 'position' => Fns::get_option( 'general', 'notification', 'notification_position', 'center-center' ),
336 315 ],
337 - rtsb()->nonceId => wp_create_nonce( rtsb()->nonceText ),
316 + rtsb()->nonceId => wp_create_nonce( rtsb()->nonceText ),
338 317 ]
339 318 );
340 319 }
341 320
@@ -348,10 +327,9 @@
348 327 /**
349 328 * Styles.
350 329 */
351 330 wp_register_style( 'rtsb-admin-app', rtsb()->get_assets_uri( 'css/backend/admin-settings.css' ), '', $this->version );
352 - wp_register_style( 'rtsb-fonts', rtsb()->get_assets_uri( 'css/frontend/rtsb-fonts.css' ), '', $this->version );
353 - // 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 );
354 332 wp_register_style( 'rtsb-templatebuilder', rtsb()->get_assets_uri( 'css/backend/template-builder.css' ), '', $this->version );
355 333
356 334 /**
357 335 * Scripts.
@@ -357,8 +335,9 @@
357 335 * Scripts.
358 336 */
359 337 wp_register_script( 'rtsb-admin-app', rtsb()->get_assets_uri( 'js/backend/admin-settings.js' ), '', $this->version, true );
360 338 wp_register_script( 'rtsb-templatebuilder', rtsb()->get_assets_uri( 'js/backend/template-builder.js' ), '', $this->version, true );
339 +
361 340 }
362 341
363 342 /**
364 343 * Enqueues admin scripts.
@@ -367,28 +346,14 @@
367 346 *
368 347 * @return void
369 348 */
370 349 public function enqueue_backend_scripts( $hook ) {
371 - ob_start(); ?>
372 - #adminmenu .toplevel_page_rtsb .wp-menu-image img {
373 - width: auto;
374 - height: 22px;
375 - padding: 4px 0;
376 - }
377 - .post-type-rtsb_builder li#wp-admin-bar-WPML_ALS_all,
378 - .post-type-rtsb_builder li.language_all{
379 - display: none;
380 - }
381 350
382 - <?php
383 - $admin_global_style = ob_get_clean();
384 - // Speed Optimization.
385 - wp_add_inline_style( 'admin-menu', $admin_global_style );
386 - // wp_enqueue_style( 'rtsb-admin-global' );
351 + wp_enqueue_style( 'rtsb-admin-global' );
387 352
388 353 global $pagenow;
389 354
390 - if ( 'admin.php' === $pagenow && ! empty( $_GET['page'] ) && 'rtsb-settings' === $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
355 + if ( 'admin.php' === $pagenow && ! empty( $_GET['page'] ) && 'rtsb-settings' === $_GET['page'] ) {
391 356 // Elementor Console Error Fixed For "rtsb-settings" Page.
392 357 wp_dequeue_script( 'elementor-admin-top-bar' );
393 358 wp_dequeue_script( 'elementor-common' );
394 359 wp_dequeue_script( 'elementor-dev-tools' );
@@ -406,9 +371,8 @@
406 371 /**
407 372 * Styles.
408 373 */
409 374 wp_enqueue_style( 'rtsb-admin-app' );
410 - wp_enqueue_style( 'rtsb-fonts' );
411 375
412 376 /**
413 377 * Scripts.
414 378 */
@@ -424,9 +388,9 @@
424 388 'rest_nonce' => wp_create_nonce( 'wp_rest' ),
425 389 'nonce' => wp_create_nonce( rtsb()->nonceText ),
426 390 'sections' => Settings::instance()->get_sections(),
427 391 'pages' => Fns::get_pages(),
428 - 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
392 + 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no'
429 393 ]
430 394 );
431 395 } else {
432 396 $current_screen = get_current_screen();
@@ -439,9 +403,9 @@
439 403 * Styles.
440 404 */
441 405 wp_enqueue_style( 'rtsb-templatebuilder' );
442 406
443 - wp_enqueue_style( 'select2', plugins_url( 'assets/css/select2.css', WC_PLUGIN_FILE ) ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
407 + wp_enqueue_style( 'select2', plugins_url( 'assets/css/select2.css', WC_PLUGIN_FILE ) );
444 408
445 409 wp_enqueue_script( 'selectWoo' );
446 410 /**
447 411 * Scripts.
@@ -454,9 +418,9 @@
454 418 [
455 419 'ajaxurl' => esc_url( self::$ajaxurl ),
456 420 'homeurl' => home_url(),
457 421 rtsb()->nonceId => wp_create_nonce( rtsb()->nonceText ),
458 - 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
422 + 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no'
459 423 ]
460 424 );
461 425 }
462 426 }