From 5fc5f3a3e18f8a13b52bd3fd60a93b02ac3652b8 Mon Sep 17 00:00:00 2001 From: Parsa Kafi Date: Mon, 25 Nov 2024 17:50:30 +0330 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20Assets=20versions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/admin/gutenberg-jalali-calendar.php | 4 ++-- includes/admin/styles-fix.php | 8 ++++---- includes/admin/widgets.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/includes/admin/gutenberg-jalali-calendar.php b/includes/admin/gutenberg-jalali-calendar.php index 7319b90..81335dd 100644 --- a/includes/admin/gutenberg-jalali-calendar.php +++ b/includes/admin/gutenberg-jalali-calendar.php @@ -42,7 +42,7 @@ function wpp_gutenberg_jalali_calendar_editor_assets() { 'wp-data', 'wp-date' ), - true + WP_PARSI_VER ); $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || wpp_is_active( 'dev_mode' ) ? '' : '.min'; @@ -51,7 +51,7 @@ function wpp_gutenberg_jalali_calendar_editor_assets() { wp_enqueue_style( 'wpp_gutenberg_jalali_calendar_editor_styles', WP_PARSI_URL . 'assets/css/gutenberg-jalali-calendar.build.css', - array( 'wp-edit-blocks' ) + array( 'wp-edit-blocks' ), WP_PARSI_VER ); } } diff --git a/includes/admin/styles-fix.php b/includes/admin/styles-fix.php index 9ef13ea..d8d9cf1 100644 --- a/includes/admin/styles-fix.php +++ b/includes/admin/styles-fix.php @@ -32,10 +32,10 @@ function wpp_fix_editor_rtl() { * @since 2.0 */ function wpp_fix_tinymce_font() { - if( wpp_is_active( 'enable_fonts' ) ){ - $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || wpp_is_active( 'dev_mode' ) ? '' : '.min'; - add_editor_style( WP_PARSI_URL . "assets/css/editor$suffix.css" ); - } + if ( wpp_is_active( 'enable_fonts' ) ) { + $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || wpp_is_active( 'dev_mode' ) ? '' : '.min'; + add_editor_style( WP_PARSI_URL . "assets/css/editor$suffix.css" ); + } } add_filter( 'init', 'wpp_fix_tinymce_font', 9 ); diff --git a/includes/admin/widgets.php b/includes/admin/widgets.php index 6799139..d5a9000 100644 --- a/includes/admin/widgets.php +++ b/includes/admin/widgets.php @@ -333,10 +333,10 @@ function wpp_enqueue_admin_dashboard_assets( $hook ) { $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || wpp_is_active( 'dev_mode' ) ? '' : '.min'; - wp_enqueue_style( 'keen-slider', WP_PARSI_URL . "assets/css/keen-slider$suffix.css", false, '1.0.0' ); - wp_enqueue_style( 'wpp_dashboard', WP_PARSI_URL . "assets/css/dashboard$suffix.css", false, '1.0.0' ); - wp_enqueue_script( 'keen-slider', WP_PARSI_URL . "assets/js/keen-slider.min.js", array(), '1.6.0', true ); - wp_enqueue_script( 'wpp_dashboard', WP_PARSI_URL . "assets/js/dashboard$suffix.js", array( 'jquery', 'keen-slider' ), '1.0.0', true ); + wp_enqueue_style( 'keen-slider', WP_PARSI_URL . "assets/css/keen-slider$suffix.css", false, '6.8.6' ); + wp_enqueue_style( 'wpp_dashboard', WP_PARSI_URL . "assets/css/dashboard$suffix.css", false, WP_PARSI_VER ); + wp_enqueue_script( 'keen-slider', WP_PARSI_URL . "assets/js/keen-slider.min.js", array(), '6.8.6', true ); + wp_enqueue_script( 'wpp_dashboard', WP_PARSI_URL . "assets/js/dashboard$suffix.js", array( 'jquery', 'keen-slider' ), WP_PARSI_VER, true ); } add_action( 'admin_enqueue_scripts', 'wpp_enqueue_admin_dashboard_assets' );