From 5f6f0dd2e312aa48eaea82177c8c6a65578ff243 Mon Sep 17 00:00:00 2001 From: Hamid Reza Yazdani Date: Tue, 19 Nov 2024 13:13:42 +0330 Subject: [PATCH 1/5] Fix some reported bugs --- includes/general.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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( __( '

ParsiDate activated, you may need to configure it to work properly. Go to configuration pageDismiss

', '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 ); } } From 5596dc8b14711188321456e0164d0e7572a8bb94 Mon Sep 17 00:00:00 2001 From: Parsa Kafi Date: Mon, 25 Nov 2024 17:41:27 +0330 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20Set=20WP=5FPARSI=5FVE?= =?UTF-8?q?R=20from=20plugin=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-parsidate.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-parsidate.php b/wp-parsidate.php index 8fafee5..3b532c3 100644 --- a/wp-parsidate.php +++ b/wp-parsidate.php @@ -97,7 +97,10 @@ private function define_const() { } if ( ! defined( 'WP_PARSI_VER' ) ) { - define( 'WP_PARSI_VER', '5.1.0' ); + if ( ! function_exists( 'get_plugin_data' ) ) + require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); + $pluginData = get_plugin_data( WP_PARSI_ROOT ); + define( 'WP_PARSI_VER', $pluginData['Version'] ); } } From 698f61ef1ef02d0d21384802514d20f01a1854e9 Mon Sep 17 00:00:00 2001 From: Parsa Kafi Date: Mon, 25 Nov 2024 17:43:35 +0330 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=94=A8=20Update=20version=20value=20t?= =?UTF-8?q?o=205.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.txt | 4 ++-- wp-parsidate.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 3b532c3..bf6f303 100644 --- a/wp-parsidate.php +++ b/wp-parsidate.php @@ -41,7 +41,7 @@ * @author Mobin Ghasempoor * @author Morteza Geransayeh * @link https://wp-parsi.com/ - * @version 5.1.1 + * @version 5.1.2 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License v3.0 * @package WP-Parsidate * @subpackage Core From 5fc5f3a3e18f8a13b52bd3fd60a93b02ac3652b8 Mon Sep 17 00:00:00 2001 From: Parsa Kafi Date: Mon, 25 Nov 2024 17:50:30 +0330 Subject: [PATCH 4/5] =?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' ); From 09912b6bb37de0ecf02b5d8d73672ab5745febcf Mon Sep 17 00:00:00 2001 From: Parsa Kafi Date: Mon, 25 Nov 2024 17:55:15 +0330 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=91=B7=20Update=20plugin=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-parsidate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-parsidate.php b/wp-parsidate.php index bf6f303..572b37b 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