Parsi Date - Version 3.0.3

Version Description

  • Fix widgets fatal errors
  • Fix get_post_modified_time output
  • Replace @ with persian character in edit posts
  • Fix notice in disable section
Download this release

Release Info

Developer man4toman
Plugin Icon Parsi Date
Version 3.0.3
Comparing to
See all releases

Code changes from version 3.0.2 to 3.0.3

assets/js/admin.js CHANGED
@@ -66,7 +66,7 @@ jQuery(document).ready(function () {
66
  }
67
  div += '</select>' +
68
  '<input type="text" id="jja" name="jja" value="' + day + '" size="2" maxlength="2" autocomplete="off" />,' +
69
- '<input type="text" id="aaa" name="aaa" value="' + year + '" size="4" maxlength="4" autocomplete="off" /> @' +
70
  '<input type="text" id="hha" name="hha" value="' + hour + '" size="2" maxlength="2" autocomplete="off" /> : ' +
71
  '<input type="text" id="mna" name="mna" value="' + minu + '" size="2" maxlength="2" autocomplete="off" />' +
72
  '</div>';
@@ -131,7 +131,7 @@ jQuery(document).ready(function () {
131
 
132
  function change_date() {
133
  var old = jQuery('#timestamp b').text();
134
- var info = jQuery('#mma option:selected').text() + ' ' + jQuery('#jja').val() + ', ' + jQuery('#aaa').val() + '@ ' + jQuery('#hha').val() + ':' + jQuery('#mna').val();
135
  info = info.replace(/\d+/g, function (digit) {
136
  var ret = '';
137
  for (var i = 0, len = digit.length; i < len; i++) {
66
  }
67
  div += '</select>' +
68
  '<input type="text" id="jja" name="jja" value="' + day + '" size="2" maxlength="2" autocomplete="off" />,' +
69
+ '<input type="text" id="aaa" name="aaa" value="' + year + '" size="4" maxlength="4" autocomplete="off" /> در ' +
70
  '<input type="text" id="hha" name="hha" value="' + hour + '" size="2" maxlength="2" autocomplete="off" /> : ' +
71
  '<input type="text" id="mna" name="mna" value="' + minu + '" size="2" maxlength="2" autocomplete="off" />' +
72
  '</div>';
131
 
132
  function change_date() {
133
  var old = jQuery('#timestamp b').text();
134
+ var info = jQuery('#mma option:selected').text() + ' ' + jQuery('#jja').val() + ', ' + jQuery('#aaa').val() + ' در ' + jQuery('#hha').val() + ':' + jQuery('#mna').val();
135
  info = info.replace(/\d+/g, function (digit) {
136
  var ret = '';
137
  for (var i = 0, len = digit.length; i < len; i++) {
includes/fixes-archives.php CHANGED
@@ -100,12 +100,12 @@ function wpp_print_archive($results, $args)
100
  if ($date === $old_date) {
101
  $count += $dt->count;
102
  } else {
103
- echo_yarchive($old_date, $args['format'], $args['before'], $count, $args['show_post_count']);
104
  $old_date = $date;
105
  $count = $dt->count;
106
  }
107
  }
108
- echo_yarchive($old_date, $args['format'], $args['before'], $count, $args['show_post_count']);
109
  } elseif ($args['type'] == 'monthly') {
110
  $old_date = parsidate('Ym', $results[0]->date, 'eng');
111
  $count = $results[0]->count;
@@ -116,12 +116,12 @@ function wpp_print_archive($results, $args)
116
  if ($date === $old_date) {
117
  $count += $dt->count;
118
  } else {
119
- echo_marchive($old_date, $args['format'], $args['before'], $count, $args['show_post_count']);
120
  $old_date = $date;
121
  $count = $dt->count;
122
  }
123
  }
124
- echo_marchive($old_date, $args['format'], $args['before'], $count, $args['show_post_count']);
125
  } elseif ($args['type'] == 'daily') {
126
  foreach ($results as $row) {
127
  $date = parsidate('Y,m,d', $row->date, 'eng');
@@ -135,4 +135,4 @@ function wpp_print_archive($results, $args)
135
  echo get_archives_link(get_day_link($date[0], $date[1], $date[2]), $text, $args['format'], $args['before'], $count);
136
  }
137
  }
138
- }
100
  if ($date === $old_date) {
101
  $count += $dt->count;
102
  } else {
103
+ echo_yarchive($old_date, $args['format'], $args['before'], $count, $args['show_post_count'], $args);
104
  $old_date = $date;
105
  $count = $dt->count;
106
  }
107
  }
108
+ echo_yarchive($old_date, $args['format'], $args['before'], $count, $args['show_post_count'], $args);
109
  } elseif ($args['type'] == 'monthly') {
110
  $old_date = parsidate('Ym', $results[0]->date, 'eng');
111
  $count = $results[0]->count;
116
  if ($date === $old_date) {
117
  $count += $dt->count;
118
  } else {
119
+ echo_marchive($old_date, $args['format'], $args['before'], $count, $args['show_post_count'], $args);
120
  $old_date = $date;
121
  $count = $dt->count;
122
  }
123
  }
124
+ echo_marchive($old_date, $args['format'], $args['before'], $count, $args['show_post_count'], $args);
125
  } elseif ($args['type'] == 'daily') {
126
  foreach ($results as $row) {
127
  $date = parsidate('Y,m,d', $row->date, 'eng');
135
  echo get_archives_link(get_day_link($date[0], $date[1], $date[2]), $text, $args['format'], $args['before'], $count);
136
  }
137
  }
138
+ }
includes/fixes-dates.php CHANGED
@@ -16,7 +16,7 @@ if (get_locale() == 'fa_IR' && $wpp_settings['persian_date'] != 'disable') {
16
  add_filter('get_the_date', 'wpp_fix_post_date', 10, 2);
17
  add_filter('get_comment_time', 'wpp_fix_comment_time', 10, 2);
18
  add_filter('get_comment_date', 'wpp_fix_comment_date', 10, 2);
19
- add_filter('get_post_modified_time', 'wpp_fix_post_modified_time', 10, 3);
20
  add_filter('date_i18n', 'wpp_fix_i18n', 10, 4);
21
  add_filter('wp_date', 'wpp_fix_i18n', 10, 4);
22
  }
@@ -191,4 +191,4 @@ function array_key_exists_r($needle, $haystack, $value = null)
191
  return $result;
192
  }
193
  return $result;
194
- }
16
  add_filter('get_the_date', 'wpp_fix_post_date', 10, 2);
17
  add_filter('get_comment_time', 'wpp_fix_comment_time', 10, 2);
18
  add_filter('get_comment_date', 'wpp_fix_comment_date', 10, 2);
19
+ //add_filter('get_post_modified_time', 'wpp_fix_post_modified_time', 10, 3);
20
  add_filter('date_i18n', 'wpp_fix_i18n', 10, 4);
21
  add_filter('wp_date', 'wpp_fix_i18n', 10, 4);
22
  }
191
  return $result;
192
  }
193
  return $result;
194
+ }
includes/plugins/disable.php CHANGED
@@ -29,6 +29,10 @@ function disable_wpp()
29
  break;
30
  }
31
  $func = $calls[++$i]['function'];
 
 
 
 
32
  $hooks = $dis_hook[$func];
33
  if (empty($hooks))
34
  return true;
@@ -158,7 +162,7 @@ class WPP_Disable
158
  'name' => __('Hook list', 'wp-parsidate'),
159
  'type' => 'textarea',
160
  'options' => $options,
161
- 'std' => 'enable',
162
  'desc' => __('Enter hook,class,function to remove parsidate filter from it', 'wp-parsidate')
163
  )
164
  );
@@ -167,4 +171,4 @@ class WPP_Disable
167
  }
168
  }
169
 
170
- return WPP_Disable::getInstance();
29
  break;
30
  }
31
  $func = $calls[++$i]['function'];
32
+
33
+ if (empty($dis_hook[$func]))
34
+ return true;
35
+
36
  $hooks = $dis_hook[$func];
37
  if (empty($hooks))
38
  return true;
162
  'name' => __('Hook list', 'wp-parsidate'),
163
  'type' => 'textarea',
164
  'options' => $options,
165
+ 'std' => '',
166
  'desc' => __('Enter hook,class,function to remove parsidate filter from it', 'wp-parsidate')
167
  )
168
  );
171
  }
172
  }
173
 
174
+ return WPP_Disable::getInstance();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wp-parsi.com/support/
4
  Tags: shamsi, wp-parsi, wpparsi, persian, parsi, farsi, jalali, date, calendar, i18n, l10n, Iran, Iranian, parsidate, rtl, gutenberg
5
  Requires at least: 5.3
6
  Tested up to: 5.3
7
- Stable tag: 3.0.2
8
 
9
  Persian date support for WordPress
10
 
@@ -44,6 +44,12 @@ List of some features:
44
 
45
  == Changelog ==
46
 
 
 
 
 
 
 
47
  = 3.0.2 =
48
  * Now we support WordPress 5.3!
49
  * Replace/add wp_date instead old function
4
  Tags: shamsi, wp-parsi, wpparsi, persian, parsi, farsi, jalali, date, calendar, i18n, l10n, Iran, Iranian, parsidate, rtl, gutenberg
5
  Requires at least: 5.3
6
  Tested up to: 5.3
7
+ Stable tag: 3.0.3
8
 
9
  Persian date support for WordPress
10
 
44
 
45
  == Changelog ==
46
 
47
+ = 3.0.3 =
48
+ * Fix widgets fatal errors
49
+ * Fix get_post_modified_time output
50
+ * Replace @ with persian character in edit posts
51
+ * Fix notice in disable section
52
+
53
  = 3.0.2 =
54
  * Now we support WordPress 5.3!
55
  * Replace/add wp_date instead old function
wp-parsidate.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
  * Plugin Name: WP-Parsidate
4
- * Version: 3.0.2
5
- * Plugin URI: https://wp-parsi.com/support/
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
8
  * Author URI: http://wp-parsi.com/
1
  <?php
2
  /**
3
  * Plugin Name: WP-Parsidate
4
+ * Version: 3.0.3
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
8
  * Author URI: http://wp-parsi.com/