PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.5.2
ShopBuilder – WooCommerce Builder For Elementor v2.5.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 +40 -20 2.1.112.5.2 View file →
@@ -104,12 +104,14 @@
104 104 'handle' => 'rtsb-frontend',
105 105 'src' => rtsb()->get_assets_uri( 'css/frontend/frontend' . $rtl_suffix . '.css' ),
106 106 ];
107 107
108 + /*
108 109 $this->styles[] = [
109 110 'handle' => 'swiper',
110 111 'src' => rtsb()->get_assets_uri( 'vendor/swiper/css/swiper-bundle.min.css' ),
111 112 ];
113 + */
112 114
113 115 if ( BuilderFns::is_builder_preview() && 'elementor' == Fns::page_edit_with( get_the_ID() ) ) {
114 116 $this->styles[] = [
115 117 'handle' => 'photoswipe',
@@ -269,8 +271,9 @@
269 271 /**
270 272 * Register scripts.
271 273 */
272 274 $this->register_public_scripts();
275 + // wp_enqueue_style( 'swiper' );
273 276 /**
274 277 * Enqueue scripts.
275 278 */
276 279 if ( BuilderFns::is_builder_preview() && 'elementor' === Fns::page_edit_with( get_the_ID() ) ) {
@@ -276,9 +279,8 @@
276 279 if ( BuilderFns::is_builder_preview() && 'elementor' === Fns::page_edit_with( get_the_ID() ) ) {
277 280 /**
278 281 * Styles.
279 282 */
280 - wp_enqueue_style( 'swiper' );
281 283 wp_enqueue_style( 'photoswipe' );
282 284 wp_enqueue_style( 'photoswipe-default-skin' );
283 285 wp_enqueue_style( 'elementor-editor-style-fix' );
284 286 wp_enqueue_style( 'woocommerce-general' );
@@ -349,9 +351,19 @@
349 351 * Styles.
350 352 */
351 353 wp_register_style( 'rtsb-admin-app', rtsb()->get_assets_uri( 'css/backend/admin-settings.css' ), '', $this->version );
352 354 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 );
355 +
356 + $current_screen = get_current_screen();
357 +
358 + if ( 'edit-rtsb_builder' === $current_screen->id ) {
359 + if ( ! function_exists( 'woocommerce_get_asset_url' ) ) {
360 + include_once WC_ABSPATH . 'includes/wc-template-functions.php';
361 + }
362 +
363 + wp_deregister_style( 'select2' );
364 + wp_register_style( 'select2', plugins_url( 'assets/css/select2.css', WC_PLUGIN_FILE ) ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
365 + }
354 366 wp_register_style( 'rtsb-templatebuilder', rtsb()->get_assets_uri( 'css/backend/template-builder.css' ), '', $this->version );
355 367
356 368 /**
357 369 * Scripts.
@@ -373,12 +385,12 @@
373 385 width: auto;
374 386 height: 22px;
375 387 padding: 4px 0;
376 388 }
377 - .post-type-rtsb_builder li#wp-admin-bar-WPML_ALS_all,
378 - .post-type-rtsb_builder li.language_all{
379 - display: none;
380 - }
389 + .post-type-rtsb_builder li#wp-admin-bar-WPML_ALS_all,
390 + .post-type-rtsb_builder li.language_all{
391 + display: none;
392 + }
381 393
382 394 <?php
383 395 $admin_global_style = ob_get_clean();
384 396 // Speed Optimization.
@@ -386,8 +398,19 @@
386 398 // wp_enqueue_style( 'rtsb-admin-global' );
387 399
388 400 global $pagenow;
389 401
402 + $whitelisted_pages = [ 'rtsb-settings', 'rtsb-get-help', 'rtsb-themes' ];
403 + $current_page = ! empty( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
404 +
405 + if ( 'admin.php' === $pagenow && ! empty( $_GET['page'] ) && in_array( $current_page, $whitelisted_pages, true ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
406 + /**
407 + * Styles.
408 + */
409 + wp_enqueue_style( 'rtsb-admin-app' );
410 + wp_enqueue_style( 'rtsb-fonts' );
411 + }
412 +
390 413 if ( 'admin.php' === $pagenow && ! empty( $_GET['page'] ) && 'rtsb-settings' === $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
391 414 // Elementor Console Error Fixed For "rtsb-settings" Page.
392 415 wp_dequeue_script( 'elementor-admin-top-bar' );
393 416 wp_dequeue_script( 'elementor-common' );
@@ -403,14 +426,8 @@
403 426 wp_dequeue_style( 'e-theme-ui-light' );
404 427 wp_dequeue_style( 'elementor-common' );
405 428
406 429 /**
407 - * Styles.
408 - */
409 - wp_enqueue_style( 'rtsb-admin-app' );
410 - wp_enqueue_style( 'rtsb-fonts' );
411 -
412 - /**
413 430 * Scripts.
414 431 */
415 432 wp_enqueue_script( 'updates' );
416 433 wp_enqueue_script( 'rtsb-admin-app' );
@@ -417,16 +434,19 @@
417 434 wp_localize_script(
418 435 'rtsb-admin-app',
419 436 'rtsbParams',
420 437 [
421 - 'ajaxurl' => esc_url( self::$ajaxurl ),
422 - 'homeurl' => home_url(),
423 - 'restApiUrl' => esc_url_raw( rest_url() ),
424 - 'rest_nonce' => wp_create_nonce( 'wp_rest' ),
425 - 'nonce' => wp_create_nonce( rtsb()->nonceText ),
426 - 'sections' => Settings::instance()->get_sections(),
427 - 'pages' => Fns::get_pages(),
428 - 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
438 + 'ajaxurl' => esc_url( self::$ajaxurl ),
439 + 'homeurl' => home_url(),
440 + 'adminLogo' => rtsb()->get_assets_uri( 'images/icon/ShopBuilder-Logo.svg' ),
441 + 'restApiUrl' => esc_url_raw( rest_url() ),
442 + 'rest_nonce' => wp_create_nonce( 'wp_rest' ),
443 + 'nonce' => wp_create_nonce( rtsb()->nonceText ),
444 + 'pages' => Fns::get_pages(),
445 + 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
446 + 'updateRates' => esc_html__( 'Update All Rates', 'shopbuilder' ),
447 + 'sections' => Settings::instance()->get_sections(),
448 + 'userRoles' => Fns::get_all_user_roles(),
429 449 ]
430 450 );
431 451 } else {
432 452 $current_screen = get_current_screen();