PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.4.0
ShopBuilder – WooCommerce Builder For Elementor v2.4.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 +39 -14 2.1.92.4.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,8 +383,13 @@
372 383 width: auto;
373 384 height: 22px;
374 385 padding: 4px 0;
375 386 }
387 + .post-type-rtsb_builder li#wp-admin-bar-WPML_ALS_all,
388 + .post-type-rtsb_builder li.language_all{
389 + display: none;
390 + }
391 +
376 392 <?php
377 393 $admin_global_style = ob_get_clean();
378 394 // Speed Optimization.
379 395 wp_add_inline_style( 'admin-menu', $admin_global_style );
@@ -380,8 +396,19 @@
380 396 // wp_enqueue_style( 'rtsb-admin-global' );
381 397
382 398 global $pagenow;
383 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 +
384 411 if ( 'admin.php' === $pagenow && ! empty( $_GET['page'] ) && 'rtsb-settings' === $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
385 412 // Elementor Console Error Fixed For "rtsb-settings" Page.
386 413 wp_dequeue_script( 'elementor-admin-top-bar' );
387 414 wp_dequeue_script( 'elementor-common' );
@@ -397,13 +424,8 @@
397 424 wp_dequeue_style( 'e-theme-ui-light' );
398 425 wp_dequeue_style( 'elementor-common' );
399 426
400 427 /**
401 - * Styles.
402 - */
403 - wp_enqueue_style( 'rtsb-admin-app' );
404 -
405 - /**
406 428 * Scripts.
407 429 */
408 430 wp_enqueue_script( 'updates' );
409 431 wp_enqueue_script( 'rtsb-admin-app' );
@@ -410,16 +432,19 @@
410 432 wp_localize_script(
411 433 'rtsb-admin-app',
412 434 'rtsbParams',
413 435 [
414 - 'ajaxurl' => esc_url( self::$ajaxurl ),
415 - 'homeurl' => home_url(),
416 - 'restApiUrl' => esc_url_raw( rest_url() ),
417 - 'rest_nonce' => wp_create_nonce( 'wp_rest' ),
418 - 'nonce' => wp_create_nonce( rtsb()->nonceText ),
419 - 'sections' => Settings::instance()->get_sections(),
420 - 'pages' => Fns::get_pages(),
421 - '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(),
422 447 ]
423 448 );
424 449 } else {
425 450 $current_screen = get_current_screen();