Version Description
- Compatible with WP 4.7
- Fixed: Notice error in acf group page. #issue
- Fixed: Undefined variable
$predate
error in admin lists-fix.php #issue - Fixed by: Mostafa Soufi
Download this release
Release Info
Developer | mostafa.s1990 |
Plugin | Parsi Date |
Version | 2.2.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.0 to 2.2.1
- includes/admin/lists-fix.php +5 -1
- includes/fixes-dates.php +5 -0
- readme.txt +8 -2
- wp-parsidate.php +1 -1
includes/admin/lists-fix.php
CHANGED
@@ -71,6 +71,8 @@ function wpp_restrict_posts() {
|
|
71 |
return;
|
72 |
|
73 |
$m = isset( $_GET['mfa'] ) ? (int) $_GET['mfa'] : 0;
|
|
|
|
|
74 |
echo '<select name="mfa">';
|
75 |
echo '<option ' . selected( $m, 0, false ) . ' value="0">' . __( 'Show All Dates' , 'wp-parsidate' ) . '</option>' . PHP_EOL;
|
76 |
foreach( $list as $date ) {
|
@@ -79,8 +81,10 @@ function wpp_restrict_posts() {
|
|
79 |
$month = substr( $date, 4, 2 );
|
80 |
$month = $persian_month_names[intval( $month )];
|
81 |
|
82 |
-
if ( $predate != $date )
|
83 |
echo sprintf( '<option %s value="%s">%s</option>', selected( $m, $date, false ), $date, $month . ' ' . fixnumber( $year ) );
|
|
|
|
|
84 |
$predate = $date;
|
85 |
}
|
86 |
echo '</select>';
|
71 |
return;
|
72 |
|
73 |
$m = isset( $_GET['mfa'] ) ? (int) $_GET['mfa'] : 0;
|
74 |
+
$predate = '';
|
75 |
+
|
76 |
echo '<select name="mfa">';
|
77 |
echo '<option ' . selected( $m, 0, false ) . ' value="0">' . __( 'Show All Dates' , 'wp-parsidate' ) . '</option>' . PHP_EOL;
|
78 |
foreach( $list as $date ) {
|
81 |
$month = substr( $date, 4, 2 );
|
82 |
$month = $persian_month_names[intval( $month )];
|
83 |
|
84 |
+
if ( $predate != $date ) {
|
85 |
echo sprintf( '<option %s value="%s">%s</option>', selected( $m, $date, false ), $date, $month . ' ' . fixnumber( $year ) );
|
86 |
+
}
|
87 |
+
|
88 |
$predate = $date;
|
89 |
}
|
90 |
echo '</select>';
|
includes/fixes-dates.php
CHANGED
@@ -28,6 +28,11 @@ if ( $wpp_settings['persian_date'] != 'disable' ) {
|
|
28 |
*/
|
29 |
function wpp_fix_post_date( $time, $format = '' ) {
|
30 |
global $post, $wpp_settings;
|
|
|
|
|
|
|
|
|
|
|
31 |
if ( empty( $format ) )
|
32 |
$format = get_option( 'date_format' );
|
33 |
|
28 |
*/
|
29 |
function wpp_fix_post_date( $time, $format = '' ) {
|
30 |
global $post, $wpp_settings;
|
31 |
+
|
32 |
+
// It's seems some plugin like acf does not exits $post.
|
33 |
+
if( empty($post) )
|
34 |
+
return $time;
|
35 |
+
|
36 |
if ( empty( $format ) )
|
37 |
$format = get_option( 'date_format' );
|
38 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: lord_viper, man4toman, iEhsan.ir
|
|
3 |
Donate link: http://forum.wp-parsi.com/
|
4 |
Tags: shamsi, wp-parsi, wpparsi, persian, parsi, farsi, jalali, date, calendar, i18n, l10n, Iran, Iranian, parsidate, rtl
|
5 |
Requires at least: 3.6
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 2.2
|
8 |
|
9 |
Persian date support for WordPress
|
10 |
|
@@ -41,6 +41,12 @@ List of some features:
|
|
41 |
4. 'Jalali Date Calender' in action
|
42 |
|
43 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
= 2.2 =
|
45 |
* Fixed: Widgets bug causes Deprecated notices in WordPress >= 4.3
|
46 |
* Fixed: the_modified_date() is now in Shamsi. [Reported by Amirhossein Habibi]
|
3 |
Donate link: http://forum.wp-parsi.com/
|
4 |
Tags: shamsi, wp-parsi, wpparsi, persian, parsi, farsi, jalali, date, calendar, i18n, l10n, Iran, Iranian, parsidate, rtl
|
5 |
Requires at least: 3.6
|
6 |
+
Tested up to: 4.7
|
7 |
+
Stable tag: 2.2.1
|
8 |
|
9 |
Persian date support for WordPress
|
10 |
|
41 |
4. 'Jalali Date Calender' in action
|
42 |
|
43 |
== Changelog ==
|
44 |
+
= 2.2.1 =
|
45 |
+
* Compatible with WP 4.7
|
46 |
+
* Fixed: Notice error in acf group page. [#issue](https://wordpress.org/support/topic/need-a-conditional-for-posts-in-wpp_fix_post_date-function/)
|
47 |
+
* Fixed: Undefined variable `$predate` error in admin lists-fix.php [#issue](https://wordpress.org/support/topic/undefined-variable-predate-in-admin-lists-fix-php/)
|
48 |
+
* Fixed by: [Mostafa Soufi](https://profiles.wordpress.org/mostafas1990/)
|
49 |
+
|
50 |
= 2.2 =
|
51 |
* Fixed: Widgets bug causes Deprecated notices in WordPress >= 4.3
|
52 |
* Fixed: the_modified_date() is now in Shamsi. [Reported by Amirhossein Habibi]
|
wp-parsidate.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP-Parsidate
|
4 |
-
* Version: 2.2
|
5 |
* Plugin URI: http://forum.wp-parsi.com/
|
6 |
* 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.
|
7 |
* Author: WP-Parsi Team
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP-Parsidate
|
4 |
+
* Version: 2.2.1
|
5 |
* Plugin URI: http://forum.wp-parsi.com/
|
6 |
* 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.
|
7 |
* Author: WP-Parsi Team
|