PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.5.0
ShopBuilder – WooCommerce Builder For Elementor v2.5.0
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 +38 -18 2.1.102.5.0 View file →
@@ -348,9 +348,20 @@
348 348 /**
349 349 * Styles.
350 350 */
351 351 wp_register_style( 'rtsb-admin-app', rtsb()->get_assets_uri( 'css/backend/admin-settings.css' ), '', $this->version );
352 - // wp_register_style( 'rtsb-admin-global', rtsb()->get_assets_uri( 'css/backend/admin-global.css' ), '', $this->version );
352 + wp_register_style( 'rtsb-fonts', rtsb()->get_assets_uri( 'css/frontend/rtsb-fonts.css' ), '', $this->version );
353 +
354 + $current_screen = get_current_screen();
355 +
356 + if ( 'edit-rtsb_builder' === $current_screen->id ) {
357 + if ( ! function_exists( 'woocommerce_get_asset_url' ) ) {
358 + include_once WC_ABSPATH . 'includes/wc-template-functions.php';
359 + }
360 +
361 + wp_deregister_style( 'select2' );
362 + wp_register_style( 'select2', plugins_url( 'assets/css/select2.css', WC_PLUGIN_FILE ) ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
363 + }
353 364 wp_register_style( 'rtsb-templatebuilder', rtsb()->get_assets_uri( 'css/backend/template-builder.css' ), '', $this->version );
354 365
355 366 /**
356 367 * Scripts.
@@ -372,12 +383,12 @@
372 383 width: auto;
373 384 height: 22px;
374 385 padding: 4px 0;
375 386 }
376 - .post-type-rtsb_builder li#wp-admin-bar-WPML_ALS_all,
377 - .post-type-rtsb_builder li.language_all{
378 - display: none;
379 - }
387 + .post-type-rtsb_builder li#wp-admin-bar-WPML_ALS_all,
388 + .post-type-rtsb_builder li.language_all{
389 + display: none;
390 + }
380 391
381 392 <?php
382 393 $admin_global_style = ob_get_clean();
383 394 // Speed Optimization.
@@ -385,8 +396,19 @@
385 396 // wp_enqueue_style( 'rtsb-admin-global' );
386 397
387 398 global $pagenow;
388 399
400 + $whitelisted_pages = [ 'rtsb-settings', 'rtsb-get-help', 'rtsb-themes' ];
401 + $current_page = ! empty( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
402 +
403 + if ( 'admin.php' === $pagenow && ! empty( $_GET['page'] ) && in_array( $current_page, $whitelisted_pages, true ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
404 + /**
405 + * Styles.
406 + */
407 + wp_enqueue_style( 'rtsb-admin-app' );
408 + wp_enqueue_style( 'rtsb-fonts' );
409 + }
410 +
389 411 if ( 'admin.php' === $pagenow && ! empty( $_GET['page'] ) && 'rtsb-settings' === $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
390 412 // Elementor Console Error Fixed For "rtsb-settings" Page.
391 413 wp_dequeue_script( 'elementor-admin-top-bar' );
392 414 wp_dequeue_script( 'elementor-common' );
@@ -402,13 +424,8 @@
402 424 wp_dequeue_style( 'e-theme-ui-light' );
403 425 wp_dequeue_style( 'elementor-common' );
404 426
405 427 /**
406 - * Styles.
407 - */
408 - wp_enqueue_style( 'rtsb-admin-app' );
409 -
410 - /**
411 428 * Scripts.
412 429 */
413 430 wp_enqueue_script( 'updates' );
414 431 wp_enqueue_script( 'rtsb-admin-app' );
@@ -415,16 +432,19 @@
415 432 wp_localize_script(
416 433 'rtsb-admin-app',
417 434 'rtsbParams',
418 435 [
419 - 'ajaxurl' => esc_url( self::$ajaxurl ),
420 - 'homeurl' => home_url(),
421 - 'restApiUrl' => esc_url_raw( rest_url() ),
422 - 'rest_nonce' => wp_create_nonce( 'wp_rest' ),
423 - 'nonce' => wp_create_nonce( rtsb()->nonceText ),
424 - 'sections' => Settings::instance()->get_sections(),
425 - 'pages' => Fns::get_pages(),
426 - 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
436 + 'ajaxurl' => esc_url( self::$ajaxurl ),
437 + 'homeurl' => home_url(),
438 + 'adminLogo' => rtsb()->get_assets_uri( 'images/icon/ShopBuilder-Logo.svg' ),
439 + 'restApiUrl' => esc_url_raw( rest_url() ),
440 + 'rest_nonce' => wp_create_nonce( 'wp_rest' ),
441 + 'nonce' => wp_create_nonce( rtsb()->nonceText ),
442 + 'pages' => Fns::get_pages(),
443 + 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
444 + 'updateRates' => esc_html__( 'Update All Rates', 'shopbuilder' ),
445 + 'sections' => Settings::instance()->get_sections(),
446 + 'userRoles' => Fns::get_all_user_roles(),
427 447 ]
428 448 );
429 449 } else {
430 450 $current_screen = get_current_screen();