Skip to content

Commit

Permalink
Merge branch 'master' into 5.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidrezayazdani authored Dec 1, 2024
2 parents 2df5b37 + 09912b6 commit 3d3cd27
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 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
9 changes: 6 additions & 3 deletions includes/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
__( '<div class="updated wpp-message"><p>ParsiDate activated, you may need to configure it to work properly. <a href="%s">Go to configuration page</a> &ndash; <a href="%s">Dismiss</a></p></div>', '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 ),
);
}
}
Expand All @@ -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 );
}
}
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions wp-parsidate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -101,7 +101,7 @@ private function define_const() {

if ( ! defined( 'WP_PARSI_VER' ) ) {
define( 'WP_PARSI_VER', '5.1.3' );
}
}
}

/**
Expand Down

0 comments on commit 3d3cd27

Please sign in to comment.