Skip to content

Commit

Permalink
🐛 Fix: Assets versions
Browse files Browse the repository at this point in the history
  • Loading branch information
parsakafi committed Nov 25, 2024
1 parent 698f61e commit 5fc5f3a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions includes/admin/gutenberg-jalali-calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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
);
}
}
Expand Down
8 changes: 4 additions & 4 deletions includes/admin/styles-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
8 changes: 4 additions & 4 deletions includes/admin/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down

0 comments on commit 5fc5f3a

Please sign in to comment.