Version Description
Download this release
Release Info
Developer | man4toman |
Plugin | Parsi Date |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.7 to 2.2.0
- includes/{fixes-get_archives.php → fixes-archives.php} +0 -0
- includes/{fixes-get_calendar.php → fixes-calendar.php} +0 -0
- includes/fixes-dates.php +2 -0
- includes/plugins/edd.php +85 -0
- includes/widget/widget_archive.php +7 -1
- includes/widget/widget_calendar.php +5 -1
- parsi-languages/fa_IR.mo +0 -0
- parsi-languages/fa_IR.po +33 -21
- readme.txt +10 -5
- wp-parsidate.php +6 -5
includes/{fixes-get_archives.php → fixes-archives.php}
RENAMED
File without changes
|
includes/{fixes-get_calendar.php → fixes-calendar.php}
RENAMED
File without changes
|
includes/fixes-dates.php
CHANGED
@@ -14,6 +14,8 @@ if ( $wpp_settings['persian_date'] != 'disable' ) {
|
|
14 |
add_filter( 'the_date', 'wpp_fix_post_date', 10, 2 );
|
15 |
add_filter( 'get_comment_time', 'wpp_fix_comment_time', 10, 2 );
|
16 |
add_filter( 'get_comment_date', 'wpp_fix_comment_date', 10, 2 );
|
|
|
|
|
17 |
add_action( 'date_i18n', 'wpp_fix_i18n', 10, 3 );
|
18 |
}
|
19 |
|
14 |
add_filter( 'the_date', 'wpp_fix_post_date', 10, 2 );
|
15 |
add_filter( 'get_comment_time', 'wpp_fix_comment_time', 10, 2 );
|
16 |
add_filter( 'get_comment_date', 'wpp_fix_comment_date', 10, 2 );
|
17 |
+
add_filter( 'get_post_modified_time', 'wpp_fix_post_date', 10, 2 );
|
18 |
+
|
19 |
add_action( 'date_i18n', 'wpp_fix_i18n', 10, 3 );
|
20 |
}
|
21 |
|
includes/plugins/edd.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Makes EDD compatible with WP-Parsidate plugin
|
4 |
+
*
|
5 |
+
* @package WP-Parsidate
|
6 |
+
* @subpackage Plugins/EDD
|
7 |
+
* @author Ehsaan
|
8 |
+
*/
|
9 |
+
|
10 |
+
class WPP_EDD {
|
11 |
+
public static $instance = null;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Returns an instance of class
|
15 |
+
*
|
16 |
+
* @return WPP_WooCommerce
|
17 |
+
*/
|
18 |
+
public static function getInstance() {
|
19 |
+
if ( self::$instance == null )
|
20 |
+
self::$instance = new WPP_EDD();
|
21 |
+
|
22 |
+
return self::$instance;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Hooks required tags
|
27 |
+
*/
|
28 |
+
private function __construct() {
|
29 |
+
global $wpp_settings;
|
30 |
+
add_filter( 'wpp_plugins_compability_settings', array( $this, 'add_settings' ) );
|
31 |
+
|
32 |
+
if ( isset( $wpp_settings['edd_prices'] ) && $wpp_settings['edd_prices'] != 'disable' ) {
|
33 |
+
add_filter( 'edd_rial_currency_filter_after', 'per_number', 10, 2 );
|
34 |
+
}
|
35 |
+
|
36 |
+
if ( isset( $wpp_settings['edd_rial_fix'] ) && $wpp_settings['edd_rial_fix'] != 'disable' ) {
|
37 |
+
add_filter( 'edd_rial_currency_filter_after', array( $this, 'rial_fix' ), 10, 2 );
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* RIAL fix for EDD
|
43 |
+
*/
|
44 |
+
public function rial_fix( $price, $did ) {
|
45 |
+
return str_replace( 'RIAL', 'ریال', $price );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Adds settings for toggle fixing
|
50 |
+
*
|
51 |
+
* @param array $old_settings Old settings
|
52 |
+
* @return array New settings
|
53 |
+
*/
|
54 |
+
public function add_settings( $old_settings ) {
|
55 |
+
$options = array(
|
56 |
+
'enable' => __( 'Enable', 'wp-parsidate' ),
|
57 |
+
'disable' => __( 'Disable', 'wp-parsidate' )
|
58 |
+
);
|
59 |
+
$settings = array(
|
60 |
+
'edd' => array(
|
61 |
+
'id' => 'edd',
|
62 |
+
'name' => __( 'Easy Digital Downloads', 'wp-parsidate' ),
|
63 |
+
'type' => 'header'
|
64 |
+
),
|
65 |
+
'edd_prices' => array(
|
66 |
+
'id' => 'edd_prices',
|
67 |
+
'name' => __( 'Fix prices', 'wp-parsidate' ),
|
68 |
+
'type' => 'radio',
|
69 |
+
'options' => $options,
|
70 |
+
'std' => 'disable'
|
71 |
+
),
|
72 |
+
'edd_rial_fix' => array(
|
73 |
+
'id' => 'edd_rial_fix',
|
74 |
+
'name' => __( 'Replace ریال with RIAL', 'wp-parsidate' ),
|
75 |
+
'type' => 'radio',
|
76 |
+
'options' => $options,
|
77 |
+
'std' => 'disable'
|
78 |
+
)
|
79 |
+
);
|
80 |
+
|
81 |
+
return array_merge( $old_settings, $settings );
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
return WPP_EDD::getInstance();
|
includes/widget/widget_archive.php
CHANGED
@@ -8,7 +8,13 @@ class parsidate_archive extends WP_Widget
|
|
8 |
{
|
9 |
public function __construct()
|
10 |
{
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
13 |
|
14 |
public function form($instance)
|
8 |
{
|
9 |
public function __construct()
|
10 |
{
|
11 |
+
global $wp_version;
|
12 |
+
|
13 |
+
// backwards compability
|
14 |
+
if ( version_compare( $wp_version , '4.3', '>=' ) )
|
15 |
+
parent::__construct(false,__('Jalali Date Archives','wp-parsidate'),'description='.__('Jalali Date Archives','wp-parsidate'));
|
16 |
+
else
|
17 |
+
parent::WP_Widget(false,__('Jalali Date Archives','wp-parsidate'),'description='.__('Jalali Date Archives','wp-parsidate'));
|
18 |
}
|
19 |
|
20 |
public function form($instance)
|
includes/widget/widget_calendar.php
CHANGED
@@ -8,7 +8,11 @@ class parsidate_calendar extends WP_Widget
|
|
8 |
{
|
9 |
public function __construct()
|
10 |
{
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
}
|
13 |
|
14 |
public function form($instance)
|
8 |
{
|
9 |
public function __construct()
|
10 |
{
|
11 |
+
global $wp_version;
|
12 |
+
if ( version_compare( $wp_version , '4.3', '>=' ) )
|
13 |
+
parent::__construct(false,__('Jalali Date Calender','wp-parsidate'),'description='.__('Jalali Date Calender','wp-parsidate'));
|
14 |
+
else
|
15 |
+
parent::WP_Widget(false,__('Jalali Date Calender','wp-parsidate'),'description='.__('Jalali Date Calender','wp-parsidate'));
|
16 |
}
|
17 |
|
18 |
public function form($instance)
|
parsi-languages/fa_IR.mo
CHANGED
Binary file
|
parsi-languages/fa_IR.po
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP-Parsi additional strings\n"
|
4 |
-
"POT-Creation-Date: 2015-
|
5 |
-
"PO-Revision-Date: 2015-
|
6 |
"Last-Translator: Ehsan <iehsan.ir@gmail.com>\n"
|
7 |
"Language-Team: WP-Pari Team\n"
|
8 |
"Language: fa_IR\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.8.
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"Plural-Forms: nplurals=1; plural=0;\n"
|
15 |
"X-Poedit-KeywordsList: __;_e\n"
|
@@ -31,22 +31,32 @@ msgstr ""
|
|
31 |
"نیاز به پیکربندی آن دارید. <a href=\"%s\">برگهی پیکربندی</a> – <a href="
|
32 |
"\"%s\">بیخیال</a></p></div>"
|
33 |
|
34 |
-
#: ../includes/plugins/
|
|
|
35 |
msgid "Enable"
|
36 |
msgstr "فعال"
|
37 |
|
38 |
-
#: ../includes/plugins/
|
|
|
39 |
msgid "Disable"
|
40 |
msgstr "غیرفعال"
|
41 |
|
42 |
-
#: ../includes/plugins/
|
43 |
-
msgid "
|
44 |
-
msgstr "
|
45 |
|
46 |
-
#: ../includes/plugins/woocommerce.php:58
|
47 |
msgid "Fix prices"
|
48 |
msgstr "تصحیح قیمتها"
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
#: ../includes/settings.php:24 ../includes/settings.php:25
|
51 |
#: ../includes/settings.php:32 ../includes/settings.php:33
|
52 |
#: ../includes/settings.php:570
|
@@ -189,40 +199,42 @@ msgstr ""
|
|
189 |
msgid "Upload File"
|
190 |
msgstr "آپلود فایل"
|
191 |
|
192 |
-
#: ../includes/widget/widget_archive.php:
|
193 |
#: ../includes/widget/widget_archive.php:17
|
194 |
-
#: ../includes/widget/widget_archive.php:
|
195 |
-
#: ../includes/widget/widget_archive.php:
|
196 |
-
#: ../includes/widget/widget_archive.php:
|
|
|
197 |
msgid "Jalali Date Archives"
|
198 |
msgstr "بایگانی تاریخ خورشیدی"
|
199 |
|
200 |
-
#: ../includes/widget/widget_archive.php:
|
201 |
msgid "Yearly"
|
202 |
msgstr "سالانه"
|
203 |
|
204 |
-
#: ../includes/widget/widget_archive.php:
|
205 |
msgid "Monthly"
|
206 |
msgstr "ماهانه"
|
207 |
|
208 |
-
#: ../includes/widget/widget_archive.php:
|
209 |
msgid "Daily"
|
210 |
msgstr "روزانه"
|
211 |
|
212 |
-
#: ../includes/widget/widget_archive.php:
|
213 |
msgid "Show post counts"
|
214 |
msgstr " نمايش تعداد نوشتهها "
|
215 |
|
216 |
-
#: ../includes/widget/widget_archive.php:
|
217 |
msgid "Display as dropdown"
|
218 |
msgstr " نمايش به صورت ليست بازشو"
|
219 |
|
220 |
-
#: ../includes/widget/widget_calendar.php:
|
221 |
-
#: ../includes/widget/widget_calendar.php:
|
|
|
222 |
msgid "Jalali Date Calender"
|
223 |
msgstr "گاهشمار تاریخ خورشیدی"
|
224 |
|
225 |
-
#: ../includes/widget/widget_calendar.php:
|
226 |
msgid "Title:"
|
227 |
msgstr "عنوان:"
|
228 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP-Parsi additional strings\n"
|
4 |
+
"POT-Creation-Date: 2015-09-07 14:51+0430\n"
|
5 |
+
"PO-Revision-Date: 2015-09-07 14:52+0430\n"
|
6 |
"Last-Translator: Ehsan <iehsan.ir@gmail.com>\n"
|
7 |
"Language-Team: WP-Pari Team\n"
|
8 |
"Language: fa_IR\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.4\n"
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"Plural-Forms: nplurals=1; plural=0;\n"
|
15 |
"X-Poedit-KeywordsList: __;_e\n"
|
31 |
"نیاز به پیکربندی آن دارید. <a href=\"%s\">برگهی پیکربندی</a> – <a href="
|
32 |
"\"%s\">بیخیال</a></p></div>"
|
33 |
|
34 |
+
#: ../includes/plugins/edd.php:56 ../includes/plugins/woocommerce.php:47
|
35 |
+
#: ../includes/settings.php:204
|
36 |
msgid "Enable"
|
37 |
msgstr "فعال"
|
38 |
|
39 |
+
#: ../includes/plugins/edd.php:57 ../includes/plugins/woocommerce.php:48
|
40 |
+
#: ../includes/settings.php:205
|
41 |
msgid "Disable"
|
42 |
msgstr "غیرفعال"
|
43 |
|
44 |
+
#: ../includes/plugins/edd.php:62
|
45 |
+
msgid "Easy Digital Downloads"
|
46 |
+
msgstr "Easy Digital Downloads"
|
47 |
|
48 |
+
#: ../includes/plugins/edd.php:67 ../includes/plugins/woocommerce.php:58
|
49 |
msgid "Fix prices"
|
50 |
msgstr "تصحیح قیمتها"
|
51 |
|
52 |
+
#: ../includes/plugins/edd.php:74
|
53 |
+
msgid "Replace ریال with RIAL"
|
54 |
+
msgstr "جایگزینی ریال با RIAL"
|
55 |
+
|
56 |
+
#: ../includes/plugins/woocommerce.php:53
|
57 |
+
msgid "WooCommerce"
|
58 |
+
msgstr "ووکامرس"
|
59 |
+
|
60 |
#: ../includes/settings.php:24 ../includes/settings.php:25
|
61 |
#: ../includes/settings.php:32 ../includes/settings.php:33
|
62 |
#: ../includes/settings.php:570
|
199 |
msgid "Upload File"
|
200 |
msgstr "آپلود فایل"
|
201 |
|
202 |
+
#: ../includes/widget/widget_archive.php:15
|
203 |
#: ../includes/widget/widget_archive.php:17
|
204 |
+
#: ../includes/widget/widget_archive.php:23
|
205 |
+
#: ../includes/widget/widget_archive.php:30
|
206 |
+
#: ../includes/widget/widget_archive.php:48
|
207 |
+
#: ../includes/widget/widget_archive.php:59
|
208 |
msgid "Jalali Date Archives"
|
209 |
msgstr "بایگانی تاریخ خورشیدی"
|
210 |
|
211 |
+
#: ../includes/widget/widget_archive.php:32
|
212 |
msgid "Yearly"
|
213 |
msgstr "سالانه"
|
214 |
|
215 |
+
#: ../includes/widget/widget_archive.php:33
|
216 |
msgid "Monthly"
|
217 |
msgstr "ماهانه"
|
218 |
|
219 |
+
#: ../includes/widget/widget_archive.php:34
|
220 |
msgid "Daily"
|
221 |
msgstr "روزانه"
|
222 |
|
223 |
+
#: ../includes/widget/widget_archive.php:37
|
224 |
msgid "Show post counts"
|
225 |
msgstr " نمايش تعداد نوشتهها "
|
226 |
|
227 |
+
#: ../includes/widget/widget_archive.php:40
|
228 |
msgid "Display as dropdown"
|
229 |
msgstr " نمايش به صورت ليست بازشو"
|
230 |
|
231 |
+
#: ../includes/widget/widget_calendar.php:13
|
232 |
+
#: ../includes/widget/widget_calendar.php:15
|
233 |
+
#: ../includes/widget/widget_calendar.php:23
|
234 |
msgid "Jalali Date Calender"
|
235 |
msgstr "گاهشمار تاریخ خورشیدی"
|
236 |
|
237 |
+
#: ../includes/widget/widget_calendar.php:22
|
238 |
msgid "Title:"
|
239 |
msgstr "عنوان:"
|
240 |
|
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
===
|
2 |
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.3
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
-
Persian date
|
10 |
|
11 |
== Description ==
|
12 |
|
@@ -30,8 +30,8 @@ List of some features:
|
|
30 |
|
31 |
1. Upload plugin folder to the `/wp-content/plugins/` directory
|
32 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
33 |
-
3. To use the widget, go to 'Widgets' and choose 'بایگانی تاریخ خورشیدی'
|
34 |
-
4. To use the widget, go to 'Widgets' and choose 'گاهشمار تاریخ خورشیدی'
|
35 |
|
36 |
== Screenshots ==
|
37 |
|
@@ -41,6 +41,11 @@ List of some features:
|
|
41 |
4. 'Jalali Date Calender' in action
|
42 |
|
43 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
44 |
= 2.1.7 =
|
45 |
* Fixed timezone bug [Reported by HANNANStd]
|
46 |
* Paragraph style returned to its previous style [Reported by WP-Parsi community]
|
1 |
+
=== Parsi Date ===
|
2 |
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.3
|
7 |
+
Stable tag: 2.2
|
8 |
|
9 |
+
Persian date support for WordPress
|
10 |
|
11 |
== Description ==
|
12 |
|
30 |
|
31 |
1. Upload plugin folder to the `/wp-content/plugins/` directory
|
32 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
33 |
+
3. To use the archives widget, go to 'Widgets' and choose 'بایگانی تاریخ خورشیدی'
|
34 |
+
4. To use the calender widget, go to 'Widgets' and choose 'گاهشمار تاریخ خورشیدی'
|
35 |
|
36 |
== Screenshots ==
|
37 |
|
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]
|
47 |
+
* New: Added EDD support to convert prices digits in Persian digits.
|
48 |
+
|
49 |
= 2.1.7 =
|
50 |
* Fixed timezone bug [Reported by HANNANStd]
|
51 |
* Paragraph style returned to its previous style [Reported by WP-Parsi community]
|
wp-parsidate.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP-Parsidate
|
4 |
-
* Version: 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
|
@@ -24,7 +24,7 @@
|
|
24 |
* @author Farhan Nisi
|
25 |
* @author Ehsaan
|
26 |
* @link http://wp-parsi.com/
|
27 |
-
* @version 2.
|
28 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License v2.0
|
29 |
* @package WP-Parsidate
|
30 |
* @subpackage Core
|
@@ -87,7 +87,7 @@ final class WP_Parsidate {
|
|
87 |
define( 'WP_PARSI_URL', plugin_dir_url( WP_PARSI_ROOT ) );
|
88 |
|
89 |
if ( ! defined( 'WP_PARSI_VER' ) )
|
90 |
-
define( 'WP_PARSI_VER', '2.
|
91 |
}
|
92 |
|
93 |
/**
|
@@ -111,9 +111,10 @@ final class WP_Parsidate {
|
|
111 |
'admin/styles-fix',
|
112 |
'admin/lists-fix',
|
113 |
'admin/other-fix',
|
114 |
-
'fixes-
|
115 |
-
'fixes-
|
116 |
'plugins/woocommerce',
|
|
|
117 |
'widget/widget_archive',
|
118 |
'widget/widget_calendar'
|
119 |
);
|
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
|
24 |
* @author Farhan Nisi
|
25 |
* @author Ehsaan
|
26 |
* @link http://wp-parsi.com/
|
27 |
+
* @version 2.2
|
28 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License v2.0
|
29 |
* @package WP-Parsidate
|
30 |
* @subpackage Core
|
87 |
define( 'WP_PARSI_URL', plugin_dir_url( WP_PARSI_ROOT ) );
|
88 |
|
89 |
if ( ! defined( 'WP_PARSI_VER' ) )
|
90 |
+
define( 'WP_PARSI_VER', '2.2' );
|
91 |
}
|
92 |
|
93 |
/**
|
111 |
'admin/styles-fix',
|
112 |
'admin/lists-fix',
|
113 |
'admin/other-fix',
|
114 |
+
'fixes-calendar',
|
115 |
+
'fixes-archives',
|
116 |
'plugins/woocommerce',
|
117 |
+
'plugins/edd',
|
118 |
'widget/widget_archive',
|
119 |
'widget/widget_calendar'
|
120 |
);
|