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' ); diff --git a/includes/general.php b/includes/general.php index b8ed2eb..b155180 100644 --- a/includes/general.php +++ b/includes/general.php @@ -68,12 +68,14 @@ function wpp_login_headerurl() { function wpp_activation_notice() { $dismissed = get_option( 'wpp_dismissed', false ); - if ( ! $dismissed && ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wp-parsi-settings' ) ) { + if ( ! $dismissed && ( ! isset( $_GET['page'] ) || 'wp-parsi-settings' !== $_GET['page'] ) ) { if ( ! wpp_is_active( 'persian_date' ) ) { + $dismiss_url = wp_nonce_url( add_query_arg( 'wpp-action', 'dismiss-notice' ), 'wpp_dismiss_notice' ); + echo sprintf( __( '
', 'wp-parsidate' ), - admin_url( 'admin.php?page=wp-parsi-settings' ), - add_query_arg( 'wpp-action', 'dismiss-notice' ) + esc_url( admin_url( 'admin.php?page=wp-parsi-settings' ) ), + esc_url( $dismiss_url ), ); } } @@ -89,6 +91,7 @@ function wpp_activation_notice() { */ function wpp_dismiss_notice_action() { if ( isset( $_GET['wpp-action'] ) && $_GET['wpp-action'] == 'dismiss-notice' ) { + check_admin_referer( 'wpp_dismiss_notice' ); update_option( 'wpp_dismissed', true ); } } diff --git a/readme.txt b/readme.txt index d9cbe7a..417ed9b 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: lord_viper, man4toman, parselearn, yazdaniwp, saeedfard, iehsanir Donate link: https://wp-parsi.com/support/ Tags: shamsi, wp-parsi, wpparsi, persian, parsi, farsi, jalali, date, calendar, i18n, l10n, iran, iranian, parsidate, rtl, gutenberg, acf,woocommerce Requires at least: 5.3 -Tested up to: 6.6.1 -Stable tag: 5.1.1 +Tested up to: 6.7.1 +Stable tag: 5.1.2 Persian date support for WordPress diff --git a/wp-parsidate.php b/wp-parsidate.php index d62ec49..90c7f0f 100644 --- a/wp-parsidate.php +++ b/wp-parsidate.php @@ -3,7 +3,7 @@ /** * Plugin Name: WP-Parsidate - * Version: 5.1.1 + * Version: 5.1.2 * Plugin URI: https://wp-parsi.com/support/ * Description: Persian package for WordPress, Adds full RTL and Shamsi (Jalali) support for: posts, comments, pages, archives, search, categories, permalinks and all admin sections and TinyMce editor, lists, quick editor. This package has Jalali archive widget. * Author: WP-Parsi Team @@ -101,7 +101,7 @@ private function define_const() { if ( ! defined( 'WP_PARSI_VER' ) ) { define( 'WP_PARSI_VER', '5.1.3' ); - } + } } /**