Parsi Date - Version 2.1.5

Version Description

  • Added "Droid Sans" & "Roboto" font family to back-end environment & editor by default, also an option for returning that
  • Added an option for moving menu item to submenu
  • Fixed timezone bug that was set to "Asia/Tehran" by default
  • Cleaned codes and documentation
Download this release

Release Info

Developer iEhsan.ir
Plugin Icon Parsi Date
Version 2.1.5
Comparing to
See all releases

Code changes from version 2.1.3 to 2.1.5

includes/admin/styles-fix.php CHANGED
@@ -26,6 +26,27 @@ add_action( 'admin_print_styles-theme-editor.php', 'wpp_fix_editor_rtl', 10 );
26
  * @return void
27
  */
28
  function wpp_fix_tinymce_font() {
29
- add_editor_style( WP_PARSI_URL . 'assets/css/editor.css' );
 
 
 
 
 
30
  }
31
  add_filter( 'init', 'wpp_fix_tinymce_font', 9 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  * @return void
27
  */
28
  function wpp_fix_tinymce_font() {
29
+ global $wpp_settings;
30
+
31
+ add_editor_style( WP_PARSI_URL . 'assets/css/editor.css' );
32
+ if ( ! isset( $wpp_settings[ 'droidsans_editor' ] ) || $wpp_settings[ 'droidsans_editor' ] != 'disable' ) {
33
+ add_editor_style( WP_PARSI_URL . 'assets/css/editor-font.css' );
34
+ }
35
  }
36
  add_filter( 'init', 'wpp_fix_tinymce_font', 9 );
37
+
38
+ /**
39
+ * Style for whole Admin side
40
+ *
41
+ * @since 2.1.5
42
+ * @return void
43
+ */
44
+ function wpp_enqueue_admin() {
45
+ global $wpp_settings;
46
+
47
+ if ( ! isset( $wpp_settings[ 'droidsans_admin' ] ) || $wpp_settings[ 'droidsans_admin' ] != 'disable' ) {
48
+ wp_enqueue_style( 'wp-parsi-fonts', WP_PARSI_URL . 'assets/css/admin-fonts.css', false, WP_PARSI_VER, 'all' );
49
+ wp_enqueue_style( 'wp-parsi-admin', WP_PARSI_URL . 'assets/css/admin-styles.css', false, WP_PARSI_VER, 'all' );
50
+ }
51
+ }
52
+ add_action( 'admin_enqueue_scripts', 'wpp_enqueue_admin' );
includes/general.php CHANGED
@@ -11,6 +11,8 @@ global $wpp_settings;
11
 
12
  add_filter( 'login_headerurl', 'wpp_login_headerurl', 10, 2 );
13
  add_filter( 'locale', 'wp_parsi_set_locale' );
 
 
14
 
15
  /**
16
  * Change Locale WordPress Admin and Front-end user
@@ -118,4 +120,36 @@ function fixarabic( $content ) {
118
  function wpp_login_headerurl()
119
  {
120
  return 'http://wp-parsi.com';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  }
11
 
12
  add_filter( 'login_headerurl', 'wpp_login_headerurl', 10, 2 );
13
  add_filter( 'locale', 'wp_parsi_set_locale' );
14
+ add_action( 'admin_notices', 'wpp_activation_notice' );
15
+ add_action( 'admin_init', 'wpp_dismiss_notice_action' );
16
 
17
  /**
18
  * Change Locale WordPress Admin and Front-end user
120
  function wpp_login_headerurl()
121
  {
122
  return 'http://wp-parsi.com';
123
+ }
124
+
125
+ /**
126
+ * Notice for the activation.
127
+ * Added dismiss feature.
128
+ *
129
+ * @author Ehsaan
130
+ * @return void
131
+ */
132
+ function wpp_activation_notice() {
133
+ $dismissed = get_option( 'wpp_dismissed', false );
134
+
135
+ if ( ! $dismissed ) {
136
+ global $wpp_settings;
137
+
138
+ if ( $wpp_settings[ 'persian_date' ] != 'enable' ) {
139
+ $output = sprintf( __( '<div class="updated wpp-message"><p>ParsiDate activated, you may need to configure it to work properly. <a href="%s">Go to configuartion 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' ) );
140
+ echo $output;
141
+ }
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Dismiss the notice action
147
+ *
148
+ * @author Ehsaan
149
+ * @return void
150
+ */
151
+ function wpp_dismiss_notice_action() {
152
+ if ( isset( $_GET[ 'wpp-action' ] ) && $_GET[ 'wpp-action' ] == 'dismiss-notice' ) {
153
+ update_option( 'wpp_dismissed', true );
154
+ }
155
  }
includes/settings.php CHANGED
@@ -10,47 +10,35 @@
10
  */
11
  if ( ! defined( 'ABSPATH' ) ) exit; // No direct access allowed ;)
12
 
13
-
14
-
15
- add_action( 'admin_notices', 'wp_parsi_admin_notice' );
16
  add_action( 'admin_menu', 'wpp_add_settings_menu', 11 );
17
 
18
-
19
  /**
20
  * Add WP-Parsidate admin page settings
21
  * */
22
  function wpp_add_settings_menu() {
23
- add_menu_page(
24
- __('Parsi Settings','wp-parsidate') ,
25
- __('Parsi Settings','wp-parsidate') ,
26
- 'manage_options',
27
- 'wp-parsi-settings',
28
- 'wpp_render_settings',
29
- 'dashicons-admin-site'
30
- );
31
- }
32
-
33
 
34
- /**
35
- * Add Notice To admin for activate ParsiDate.
36
- * */
37
- function wp_parsi_admin_notice() {
38
- $settings = get_option( 'wpp_settings' );
39
- if ( $settings['persian_date'] == 'disable' ) {
40
- ?>
41
- <div class="error">
42
- <p>
43
- <?php printf(
44
- __( 'WP-Parsidate plugin Activated, Please go to <a href="%s">plugin page settings</a> and setup plugin.', 'wp-parsidate' ),
45
- admin_url('admin.php?page=wp-parsi-settings')
46
- ); ?>
47
- </p>
48
- </div>
49
- <?php
 
 
50
  }
51
  }
52
 
53
-
54
  /**
55
  * Gets saved settings from WP core
56
  *
@@ -63,7 +51,10 @@ function wp_parsi_get_settings() {
63
  update_option( 'wpp_settings', array(
64
  'admin_lang' => 'enable',
65
  'user_lang' => 'enable',
 
66
  'persian_date' => 'disable',
 
 
67
  'conv_title' => 'disable',
68
  'conv_contents' => 'disable',
69
  'conv_excerpt' => 'disable',
@@ -231,7 +222,6 @@ function wpp_get_registered_settings() {
231
  'std' => 'enable',
232
  'desc' => __( 'This option change WordPress locale in theme', 'wp-parsidate' )
233
  ),
234
-
235
  'persian_date' => array(
236
  'id' => 'persian_date',
237
  'name' => __( 'Shamsi date', 'wp-parsidate' ),
@@ -239,7 +229,15 @@ function wpp_get_registered_settings() {
239
  'options' => $options,
240
  'std' => 'disable',
241
  'desc' => __( 'By enabling this, Dates will convert to Shamsi (Jalali) dates', 'wp-parsidate' )
242
- )
 
 
 
 
 
 
 
 
243
  ) ),
244
  'conv' => apply_filters( 'wpp_conv_settings', array(
245
  'conv_nums' => array(
@@ -322,6 +320,26 @@ function wpp_get_registered_settings() {
322
  'options' => $options,
323
  'std' => 'disable',
324
  'desc' => __( 'By enabling this, dates in permalinks converted to Shamsi (Jalali) date', 'wp-parsidate' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  )
326
  ) ),
327
  'plugins' => apply_filters( 'wpp_plugins_compability_settings', array() )
10
  */
11
  if ( ! defined( 'ABSPATH' ) ) exit; // No direct access allowed ;)
12
 
 
 
 
13
  add_action( 'admin_menu', 'wpp_add_settings_menu', 11 );
14
 
 
15
  /**
16
  * Add WP-Parsidate admin page settings
17
  * */
18
  function wpp_add_settings_menu() {
19
+ global $wpp_settings;
 
 
 
 
 
 
 
 
 
20
 
21
+ if ( $wpp_settings[ 'submenu_move' ] != 'disable' ) {
22
+ add_submenu_page(
23
+ 'options-general.php',
24
+ __( 'Parsi Settings', 'wp-parsidate' ),
25
+ __( 'Parsi Settings', 'wp-parsidate' ),
26
+ 'manage_options',
27
+ 'wp-parsi-settings',
28
+ 'wpp_render_settings'
29
+ );
30
+ } else {
31
+ add_menu_page(
32
+ __('Parsi Settings','wp-parsidate') ,
33
+ __('Parsi Settings','wp-parsidate') ,
34
+ 'manage_options',
35
+ 'wp-parsi-settings',
36
+ 'wpp_render_settings',
37
+ 'dashicons-admin-site'
38
+ );
39
  }
40
  }
41
 
 
42
  /**
43
  * Gets saved settings from WP core
44
  *
51
  update_option( 'wpp_settings', array(
52
  'admin_lang' => 'enable',
53
  'user_lang' => 'enable',
54
+ 'submenu_move' => 'disable',
55
  'persian_date' => 'disable',
56
+ 'droidsans_editor' => 'enable',
57
+ 'droidsans_admin' => 'enable',
58
  'conv_title' => 'disable',
59
  'conv_contents' => 'disable',
60
  'conv_excerpt' => 'disable',
222
  'std' => 'enable',
223
  'desc' => __( 'This option change WordPress locale in theme', 'wp-parsidate' )
224
  ),
 
225
  'persian_date' => array(
226
  'id' => 'persian_date',
227
  'name' => __( 'Shamsi date', 'wp-parsidate' ),
229
  'options' => $options,
230
  'std' => 'disable',
231
  'desc' => __( 'By enabling this, Dates will convert to Shamsi (Jalali) dates', 'wp-parsidate' )
232
+ ),
233
+ 'submenu_move' => array(
234
+ 'id' => 'submenu_move',
235
+ 'name' => __( 'Move page to submenu?', 'wp-parsidate' ),
236
+ 'type' => 'radio',
237
+ 'options' => $options,
238
+ 'std' => 'disable',
239
+ 'desc' => __( 'With enabling this option, page item will be moved to Settings menu as submenu.', 'wp-parsidate' )
240
+ ),
241
  ) ),
242
  'conv' => apply_filters( 'wpp_conv_settings', array(
243
  'conv_nums' => array(
320
  'options' => $options,
321
  'std' => 'disable',
322
  'desc' => __( 'By enabling this, dates in permalinks converted to Shamsi (Jalali) date', 'wp-parsidate' )
323
+ ),
324
+ 'sep_font' => array(
325
+ 'id' => 'sep_font',
326
+ 'type' => 'header'
327
+ ),
328
+ 'droidsans_admin' => array(
329
+ 'id' => 'droidsans_admin',
330
+ 'name' => __( 'Use Droid Sans font for admin side', 'wp-parsidate' ),
331
+ 'type' => 'radio',
332
+ 'options' => $options,
333
+ 'std' => 'enable',
334
+ 'desc' => __( 'Droid Sans Naskh and Roboto font families will be activated in admin side, if this is enabled', 'wp-parsidate' )
335
+ ),
336
+ 'droidsans_editor' => array(
337
+ 'id' => 'droidsans_editor',
338
+ 'name' => __( 'Use Droid Sans font for editors', 'wp-parsidate' ),
339
+ 'type' => 'radio',
340
+ 'options' => $options,
341
+ 'std' => 'enable',
342
+ 'desc' => __( 'Droid Sans Naskh and Roboto font families will be activated in all rich editors in back end.', 'wp-parsidate' )
343
  )
344
  ) ),
345
  'plugins' => apply_filters( 'wpp_plugins_compability_settings', array() )
includes/widget/widget_calendar.php CHANGED
@@ -8,7 +8,7 @@ class parsidate_calendar extends WP_Widget
8
  {
9
  public function __construct()
10
  {
11
- parent::WP_Widget(false,__('Jalali Date Calender','wp-parsidate'),'description='.__('Jalali Date Calender','wp-parsidate'));
12
  }
13
 
14
  public function form($instance)
8
  {
9
  public function __construct()
10
  {
11
+ parent::WP_Widget(false,__('Jalali Date Calender','wp-parsidate'),'description='.__('Jalali Date Calender','wp-parsidate'));
12
  }
13
 
14
  public function form($instance)
parsi-languages/fa_IR.mo CHANGED
Binary file
parsi-languages/fa_IR.po CHANGED
@@ -1,30 +1,41 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP-Parsi additional strings\n"
4
- "POT-Creation-Date: 2014-12-26 02:53+0330\n"
5
- "PO-Revision-Date: 2014-12-26 02:59+0330\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.7.1\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=1; plural=0;\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
- #: ../includes/admin/lists-fix.php:74
20
  msgid "Show All Dates"
21
  msgstr "نمایش همه‌ی تاریخ‌ها"
22
 
23
- #: ../includes/plugins/woocommerce.php:47 ../includes/settings.php:214
 
 
 
 
 
 
 
 
 
 
 
24
  msgid "Enable"
25
  msgstr "فعال"
26
 
27
- #: ../includes/plugins/woocommerce.php:48 ../includes/settings.php:215
28
  msgid "Disable"
29
  msgstr "غیرفعال"
30
 
@@ -37,145 +48,172 @@ msgid "Fix prices"
37
  msgstr "تصحیح قیمت‌ها"
38
 
39
  #: ../includes/settings.php:24 ../includes/settings.php:25
40
- #: ../includes/settings.php:553
 
41
  msgid "Parsi Settings"
42
  msgstr "تنظیمات پارسی"
43
 
44
- #: ../includes/settings.php:45
45
- #, php-format
46
- msgid ""
47
- "WP-Parsidate plugin Activated, Please go to <a href=\"%s\">plugin page "
48
- "settings</a> and setup plugin."
49
- msgstr ""
50
- "افزونه بسته پارسی‌ساز فعال است، لطفا به <a href=\"%s\">صفحه تنظیمات افزونه</a> "
51
- "بروید و تنظیمات دلخواه را انجام دهید."
52
-
53
- #: ../includes/settings.php:136
54
  #, php-format
55
  msgid "%s Core"
56
  msgstr "%s هسته"
57
 
58
- #: ../includes/settings.php:137
59
  #, php-format
60
  msgid "%s Converts"
61
  msgstr "%s تبدیل"
62
 
63
- #: ../includes/settings.php:138
64
  #, php-format
65
  msgid "%s Plugins compability"
66
  msgstr "%s هماهنگی با افزونه‌ها"
67
 
68
- #: ../includes/settings.php:200
69
  msgid "Settings updated"
70
  msgstr "پیکربندی به‌روز شد"
71
 
72
- #: ../includes/settings.php:221
73
  msgid "Change Locale in admin"
74
  msgstr "تغییر زبان مدیریت"
75
 
76
- #: ../includes/settings.php:225
77
  msgid "This option change WordPress locale in Admin"
78
  msgstr "این گزینه باعث تغییر زبان مدیریت میشود"
79
 
80
- #: ../includes/settings.php:229
81
  msgid "Change Locale in theme"
82
  msgstr "تغییر زبان سایت"
83
 
84
- #: ../includes/settings.php:233
85
  msgid "This option change WordPress locale in theme"
86
  msgstr "این گزینه باعث تغییر زبان سایت میشود"
87
 
88
- #: ../includes/settings.php:238
89
  msgid "Shamsi date"
90
  msgstr "تاریخ خورشیدی"
91
 
92
- #: ../includes/settings.php:242
93
  msgid "By enabling this, Dates will convert to Shamsi (Jalali) dates"
94
  msgstr "با فعال‌کردن این گزینه، تاریخ‌ها به صورت تاریخ خورشیدی (جلالی) درمی‌آیند"
95
 
96
- #: ../includes/settings.php:248
 
 
 
 
 
 
 
 
 
 
97
  msgid "Persian digits"
98
  msgstr "رقم‌های پارسی"
99
 
100
- #: ../includes/settings.php:253
101
  msgid "Page title"
102
  msgstr "در عنوان صفحه"
103
 
104
- #: ../includes/settings.php:260
105
  msgid "Post title"
106
  msgstr "در عنوان نوشته‌ها"
107
 
108
- #: ../includes/settings.php:267
109
  msgid "Post content"
110
  msgstr "در محتوای نوشته‌ها"
111
 
112
- #: ../includes/settings.php:274
113
  msgid "Post excerpt"
114
  msgstr "در خلاصه‌ی نوشته‌ها"
115
 
116
- #: ../includes/settings.php:281
117
  msgid "Comments text"
118
  msgstr "در نوشته‌ی دیدگاه‌ها"
119
 
120
- #: ../includes/settings.php:288
121
  msgid "Comments count"
122
  msgstr "تعداد دیدگاه‌ها"
123
 
124
- #: ../includes/settings.php:295
125
  msgid "Dates"
126
  msgstr "تاریخ‌ها"
127
 
128
- #: ../includes/settings.php:302
129
  msgid "Categories"
130
  msgstr "دسته‌بندی‌ها"
131
 
132
- #: ../includes/settings.php:313
133
  msgid "Fix arabic characters"
134
  msgstr "تصحیح حروف عربی"
135
 
136
- #: ../includes/settings.php:317
137
  msgid "Fixes arabic characters caused by wrong keyboard layouts"
138
  msgstr ""
139
  "این گزینه، حروف عربی را در کل سیستم به حروف فارسی تصحیح می‌کند<br>برای مثال "
140
  "٤/٥/٦ به ۴ / ۵ / ۶ و ك / ي به ک / ی"
141
 
142
- #: ../includes/settings.php:321
143
  msgid "Fix permalinks dates"
144
  msgstr "تبدیل تاریخ در پیوندهای یکتا"
145
 
146
- #: ../includes/settings.php:325
147
  msgid "By enabling this, dates in permalinks converted to Shamsi (Jalali) date"
148
  msgstr ""
149
  "با فعال‌کردن این گزینه، تاریخ‌ها در پیوندهای یکتا به تاریخ خورشیدی (جلالی) تبدیل "
150
  "می‌شوند"
151
 
152
- #: ../includes/settings.php:523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  msgid "Upload File"
154
  msgstr "آپلود فایل"
155
 
156
  #: ../includes/widget/widget_archive.php:11
157
- #: ../includes/widget/widget_archive.php:20
158
- #: ../includes/widget/widget_archive.php:49
 
 
159
  msgid "Jalali Date Archives"
160
  msgstr "بایگانی تاریخ خورشیدی"
161
 
162
- #: ../includes/widget/widget_archive.php:22
163
  msgid "Yearly"
164
  msgstr "سالانه"
165
 
166
- #: ../includes/widget/widget_archive.php:23
167
  msgid "Monthly"
168
  msgstr "ماهانه"
169
 
170
- #: ../includes/widget/widget_archive.php:24
171
  msgid "Daily"
172
  msgstr "روزانه"
173
 
174
- #: ../includes/widget/widget_archive.php:27
175
  msgid "Show post counts"
176
  msgstr " نمايش تعداد نوشته‌ها "
177
 
178
- #: ../includes/widget/widget_archive.php:30
179
  msgid "Display as dropdown"
180
  msgstr " نمايش به صورت ليست بازشو"
181
 
@@ -208,10 +246,17 @@ msgstr ""
208
  msgid "WP-Parsi Team"
209
  msgstr "تیم وردپرس پارسی"
210
 
211
- #: ../wp-parsidate.php:67
212
  msgid "settings"
213
  msgstr "تنظیمات"
214
 
 
 
 
 
 
 
 
215
  #~ msgid "Persian language"
216
  #~ msgstr "زبان پارسی"
217
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP-Parsi additional strings\n"
4
+ "POT-Creation-Date: 2015-08-05 15:18+0330\n"
5
+ "PO-Revision-Date: 2015-08-05 15:19+0330\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.1\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=1; plural=0;\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
+ #: ../includes/admin/lists-fix.php:75
20
  msgid "Show All Dates"
21
  msgstr "نمایش همه‌ی تاریخ‌ها"
22
 
23
+ #: ../includes/general.php:139
24
+ #, php-format
25
+ msgid ""
26
+ "<div class=\"updated wpp-message\"><p>ParsiDate activated, you may need to "
27
+ "configure it to work properly. <a href=\"%s\">Go to configuartion page</a> "
28
+ "&ndash; <a href=\"%s\">Dismiss</a></p></div>"
29
+ msgstr ""
30
+ "<div class=\"updated wpp-message\"><p>وردپرس پارسی فعال شد! برای کارکردن افزونه "
31
+ "نیاز به پیکربندی آن دارید. <a href=\"%s\">برگه‌ی پیکربندی</a> &ndash; <a href="
32
+ "\"%s\">بی‌خیال</a></p></div>"
33
+
34
+ #: ../includes/plugins/woocommerce.php:47 ../includes/settings.php:204
35
  msgid "Enable"
36
  msgstr "فعال"
37
 
38
+ #: ../includes/plugins/woocommerce.php:48 ../includes/settings.php:205
39
  msgid "Disable"
40
  msgstr "غیرفعال"
41
 
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
53
  msgid "Parsi Settings"
54
  msgstr "تنظیمات پارسی"
55
 
56
+ #: ../includes/settings.php:126
 
 
 
 
 
 
 
 
 
57
  #, php-format
58
  msgid "%s Core"
59
  msgstr "%s هسته"
60
 
61
+ #: ../includes/settings.php:127
62
  #, php-format
63
  msgid "%s Converts"
64
  msgstr "%s تبدیل"
65
 
66
+ #: ../includes/settings.php:128
67
  #, php-format
68
  msgid "%s Plugins compability"
69
  msgstr "%s هماهنگی با افزونه‌ها"
70
 
71
+ #: ../includes/settings.php:190
72
  msgid "Settings updated"
73
  msgstr "پیکربندی به‌روز شد"
74
 
75
+ #: ../includes/settings.php:211
76
  msgid "Change Locale in admin"
77
  msgstr "تغییر زبان مدیریت"
78
 
79
+ #: ../includes/settings.php:215
80
  msgid "This option change WordPress locale in Admin"
81
  msgstr "این گزینه باعث تغییر زبان مدیریت میشود"
82
 
83
+ #: ../includes/settings.php:219
84
  msgid "Change Locale in theme"
85
  msgstr "تغییر زبان سایت"
86
 
87
+ #: ../includes/settings.php:223
88
  msgid "This option change WordPress locale in theme"
89
  msgstr "این گزینه باعث تغییر زبان سایت میشود"
90
 
91
+ #: ../includes/settings.php:227
92
  msgid "Shamsi date"
93
  msgstr "تاریخ خورشیدی"
94
 
95
+ #: ../includes/settings.php:231
96
  msgid "By enabling this, Dates will convert to Shamsi (Jalali) dates"
97
  msgstr "با فعال‌کردن این گزینه، تاریخ‌ها به صورت تاریخ خورشیدی (جلالی) درمی‌آیند"
98
 
99
+ #: ../includes/settings.php:235
100
+ msgid "Move page to submenu?"
101
+ msgstr "انتقال این برگه به زیرمنو؟"
102
+
103
+ #: ../includes/settings.php:239
104
+ msgid ""
105
+ "With enabling this option, page item will be moved to Settings menu as submenu."
106
+ msgstr ""
107
+ "با فعال‌کردن این گزینه، مورد پیکربندی پلاگین به زیرمنوی \"تنظیمات\" منتقل می‌شود."
108
+
109
+ #: ../includes/settings.php:245
110
  msgid "Persian digits"
111
  msgstr "رقم‌های پارسی"
112
 
113
+ #: ../includes/settings.php:250
114
  msgid "Page title"
115
  msgstr "در عنوان صفحه"
116
 
117
+ #: ../includes/settings.php:257
118
  msgid "Post title"
119
  msgstr "در عنوان نوشته‌ها"
120
 
121
+ #: ../includes/settings.php:264
122
  msgid "Post content"
123
  msgstr "در محتوای نوشته‌ها"
124
 
125
+ #: ../includes/settings.php:271
126
  msgid "Post excerpt"
127
  msgstr "در خلاصه‌ی نوشته‌ها"
128
 
129
+ #: ../includes/settings.php:278
130
  msgid "Comments text"
131
  msgstr "در نوشته‌ی دیدگاه‌ها"
132
 
133
+ #: ../includes/settings.php:285
134
  msgid "Comments count"
135
  msgstr "تعداد دیدگاه‌ها"
136
 
137
+ #: ../includes/settings.php:292
138
  msgid "Dates"
139
  msgstr "تاریخ‌ها"
140
 
141
+ #: ../includes/settings.php:299
142
  msgid "Categories"
143
  msgstr "دسته‌بندی‌ها"
144
 
145
+ #: ../includes/settings.php:310
146
  msgid "Fix arabic characters"
147
  msgstr "تصحیح حروف عربی"
148
 
149
+ #: ../includes/settings.php:314
150
  msgid "Fixes arabic characters caused by wrong keyboard layouts"
151
  msgstr ""
152
  "این گزینه، حروف عربی را در کل سیستم به حروف فارسی تصحیح می‌کند<br>برای مثال "
153
  "٤/٥/٦ به ۴ / ۵ / ۶ و ك / ي به ک / ی"
154
 
155
+ #: ../includes/settings.php:318
156
  msgid "Fix permalinks dates"
157
  msgstr "تبدیل تاریخ در پیوندهای یکتا"
158
 
159
+ #: ../includes/settings.php:322
160
  msgid "By enabling this, dates in permalinks converted to Shamsi (Jalali) date"
161
  msgstr ""
162
  "با فعال‌کردن این گزینه، تاریخ‌ها در پیوندهای یکتا به تاریخ خورشیدی (جلالی) تبدیل "
163
  "می‌شوند"
164
 
165
+ #: ../includes/settings.php:330
166
+ msgid "Use Droid Sans font for admin side"
167
+ msgstr "استفاده از قلم \"دروید سنس\" برای مدیریت"
168
+
169
+ #: ../includes/settings.php:334
170
+ msgid ""
171
+ "Droid Sans Naskh and Roboto font families will be activated in admin side, if "
172
+ "this is enabled"
173
+ msgstr ""
174
+ "خانواده فونت‌های \"Droid Sans Naskh\"و \"Roboto\" در قسمت مدیریت فعال خواهند شد."
175
+
176
+ #: ../includes/settings.php:338
177
+ msgid "Use Droid Sans font for editors"
178
+ msgstr "استفاده از قلم \"دروید سنس\" برای ویرایشگر"
179
+
180
+ #: ../includes/settings.php:342
181
+ msgid ""
182
+ "Droid Sans Naskh and Roboto font families will be activated in all rich editors "
183
+ "in back end."
184
+ msgstr ""
185
+ "خانواده فونت‌های \"Droid Sans Naskh\"و \"Roboto\" در همه‌ی ویرایشگرها فعال خواهند "
186
+ "شد."
187
+
188
+ #: ../includes/settings.php:540
189
  msgid "Upload File"
190
  msgstr "آپلود فایل"
191
 
192
  #: ../includes/widget/widget_archive.php:11
193
+ #: ../includes/widget/widget_archive.php:17
194
+ #: ../includes/widget/widget_archive.php:24
195
+ #: ../includes/widget/widget_archive.php:42
196
+ #: ../includes/widget/widget_archive.php:53
197
  msgid "Jalali Date Archives"
198
  msgstr "بایگانی تاریخ خورشیدی"
199
 
200
+ #: ../includes/widget/widget_archive.php:26
201
  msgid "Yearly"
202
  msgstr "سالانه"
203
 
204
+ #: ../includes/widget/widget_archive.php:27
205
  msgid "Monthly"
206
  msgstr "ماهانه"
207
 
208
+ #: ../includes/widget/widget_archive.php:28
209
  msgid "Daily"
210
  msgstr "روزانه"
211
 
212
+ #: ../includes/widget/widget_archive.php:31
213
  msgid "Show post counts"
214
  msgstr " نمايش تعداد نوشته‌ها "
215
 
216
+ #: ../includes/widget/widget_archive.php:34
217
  msgid "Display as dropdown"
218
  msgstr " نمايش به صورت ليست بازشو"
219
 
246
  msgid "WP-Parsi Team"
247
  msgstr "تیم وردپرس پارسی"
248
 
249
+ #: ../wp-parsidate.php:69
250
  msgid "settings"
251
  msgstr "تنظیمات"
252
 
253
+ #~ msgid ""
254
+ #~ "WP-Parsidate plugin Activated, Please go to <a href=\"%s\">plugin page "
255
+ #~ "settings</a> and setup plugin."
256
+ #~ msgstr ""
257
+ #~ "افزونه بسته پارسی‌ساز فعال است، لطفا به <a href=\"%s\">صفحه تنظیمات افزونه</"
258
+ #~ "a> بروید و تنظیمات دلخواه را انجام دهید."
259
+
260
  #~ msgid "Persian language"
261
  #~ msgstr "زبان پارسی"
262
 
readme.txt CHANGED
@@ -1,28 +1,29 @@
1
  === wp-parsidate ===
2
- Contributors: lord_viper, man4toman
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.1
7
- Stable tag: 2.1.3
8
 
9
- Persian package builder for WordPress, Full RTL and Shamsi(Jalali) date
10
 
11
  == Description ==
12
 
13
- Persian package builder for WordPress, Full RTL and Shamsi(Jalali) date. It's easy to use and powerful and fully featured.
14
 
15
  List of some features:
16
 
17
- * Shamsi(Jalali) date in Posts, comments, pages, archives, search, categories
18
- * Shamsi(Jalali) date in Permalinks
19
- * Shamsi(Jalali) date in admin sections such as posts lists, comments lists, pages lists
20
- * Shamsi(Jalali) date in post quick edit, comment quick edit, page quick edit of admin panel
21
- * Shamsi(Jalali) calender widget
22
- * Shamsi(Jalali) archive widget
23
  * RTL and fixed tinymce editor
24
  * Poweful and fast function for fixing Arabic (ي , ك) to Persian (ی , ک)
25
  * Poweful and fast function for Persian numbers
 
26
 
27
 
28
  == Installation ==
@@ -34,12 +35,18 @@ List of some features:
34
 
35
  == Screenshots ==
36
 
37
- 1. Persian package builder admin page
38
- 2. Widget of 'Jalali Date Archives'
39
- 3. Widget of 'Jalali Date Calender'
40
- 4. Display widget 'Jalali Date Calender' in theme
41
 
42
  == Changelog ==
 
 
 
 
 
 
43
  = 2.1.2 =
44
  * Admin menu problem fixed
45
 
1
  === wp-parsidate ===
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.1.5
8
 
9
+ Persian date & language package for WordPress
10
 
11
  == Description ==
12
 
13
+ This package is made by Persian developers to bring so much better experience of Persian WordPress. It includes Shamsi (Jalali) calendar, character issues fixes and Right-To-Left fix for WordPress back-end environment.
14
 
15
  List of some features:
16
 
17
+ * Shamsi (Jalali) date in Posts, comments, pages, archives, search, categories
18
+ * Shamsi (Jalali) date in Permalinks
19
+ * Shamsi (Jalali) date in admin sections such as posts lists, comments lists, pages lists
20
+ * Shamsi (Jalali) date in post quick edit, comment quick edit, page quick edit of admin panel
21
+ * Shamsi (Jalali) calender widget
22
+ * Shamsi (Jalali) archive widget
23
  * RTL and fixed tinymce editor
24
  * Poweful and fast function for fixing Arabic (ي , ك) to Persian (ی , ک)
25
  * Poweful and fast function for Persian numbers
26
+ * Low resources usage
27
 
28
 
29
  == Installation ==
35
 
36
  == Screenshots ==
37
 
38
+ 1. Plugin configuration page
39
+ 2. 'Jalali Date Archives' Widget
40
+ 3. 'Jalali Date Calender' Widget
41
+ 4. 'Jalali Date Calender' in action
42
 
43
  == Changelog ==
44
+ = 2.1.5 =
45
+ * Added "Droid Sans" & "Roboto" font family to back-end environment & editor by default, also an option for returning that
46
+ * Added an option for moving menu item to submenu
47
+ * Fixed timezone bug that was set to "Asia/Tehran" by default
48
+ * Cleaned codes and documentation
49
+
50
  = 2.1.2 =
51
  * Admin menu problem fixed
52
 
wp-parsidate.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: WP-Parsidate
4
- * Version: 2.1.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
@@ -56,7 +56,7 @@ final class WP_Parsidate {
56
  $this->consts();
57
  $this->setup_vars();
58
  $this->include_files();
59
- add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'WP_Parsidate::parsi_settings_link' );
60
  }
61
 
62
  /**
@@ -65,9 +65,9 @@ final class WP_Parsidate {
65
  * @param string $links
66
  * @return array
67
  */
68
- public static function parsi_settings_link( $links ) {
69
- $mylinks = array('<a href="'.menu_page_url('wp-parsi-settings',FALSE).'">'.__('settings','wp-parsidate').'</a>');
70
- return array_merge( $links, $mylinks );
71
  }
72
 
73
  /**
@@ -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.0-alpha' );
91
  }
92
 
93
  /**
@@ -96,35 +96,36 @@ final class WP_Parsidate {
96
  * @since 2.0
97
  * @return void
98
  */
99
- public function include_files() {
100
- require_once( WP_PARSI_DIR . 'includes/settings.php' );
101
- global $wpp_settings;
102
- $wpp_settings = wp_parsi_get_settings();
103
-
104
- $files = array(
105
- 'parsidate',
106
- 'general',
107
- 'fixes-archive',
108
- 'fixes-permalinks',
109
- 'fixes-dates',
110
- 'fixes-misc',
111
- 'admin/styles-fix',
112
- 'admin/lists-fix',
113
- 'admin/other-fix',
114
- 'fixes-get_calendar',
115
- 'fixes-get_archives',
116
- 'plugins/woocommerce',
117
- 'widget/widget_archive',
118
- 'widget/widget_calendar');
119
-
120
- foreach( $files as $file )
121
- require_once( WP_PARSI_DIR . 'includes/' . $file . '.php' );
122
-
123
- if ( get_locale() == 'fa_IR' )
124
- load_textdomain( 'wp-parsidate', WP_PARSI_DIR . 'parsi-languages/fa_IR.mo' );
125
-
126
- add_action( 'widgets_init', array( $this, 'register_widget' ) );
127
- }
 
128
 
129
  /**
130
  * Sets up global variables
@@ -132,25 +133,26 @@ final class WP_Parsidate {
132
  * @since 2.0
133
  * @return void
134
  */
135
- private function setup_vars() {
136
- global $persian_month_names, $timezone;
137
- $persian_month_names = array( '',
138
- 'فروردین',
139
- 'اردیبهشت',
140
- 'خرداد',
141
- 'تیر',
142
- 'مرداد',
143
- 'شهریور',
144
- 'مهر',
145
- 'آبان',
146
- 'آذر',
147
- 'دی',
148
- 'بهمن',
149
- 'اسفند');
150
-
151
- $timezone = 'Asia/Tehran';
152
- date_default_timezone_set( $timezone );
153
- }
 
154
 
155
  /**
156
  * Register Plugin Widgets
@@ -158,11 +160,11 @@ final class WP_Parsidate {
158
  * @since 2.0
159
  * @return boolean
160
  */
161
- public function register_widget() {
162
- register_widget('parsidate_archive');
163
- register_widget('parsidate_calendar');
164
- return true;
165
- }
166
  }
167
 
168
  return WP_Parsidate::get_instance();
1
  <?php
2
  /**
3
  * Plugin Name: WP-Parsidate
4
+ * Version: 2.1.5
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
56
  $this->consts();
57
  $this->setup_vars();
58
  $this->include_files();
59
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'parsi_settings_link' ) );
60
  }
61
 
62
  /**
65
  * @param string $links
66
  * @return array
67
  */
68
+ public static function parsi_settings_link( $links ) {
69
+ $mylinks = array('<a href="'.menu_page_url('wp-parsi-settings',FALSE).'">'.__('settings','wp-parsidate').'</a>');
70
+ return array_merge( $links, $mylinks );
71
  }
72
 
73
  /**
87
  define( 'WP_PARSI_URL', plugin_dir_url( WP_PARSI_ROOT ) );
88
 
89
  if ( ! defined( 'WP_PARSI_VER' ) )
90
+ define( 'WP_PARSI_VER', '2.1.5' );
91
  }
92
 
93
  /**
96
  * @since 2.0
97
  * @return void
98
  */
99
+ public function include_files() {
100
+ require_once( WP_PARSI_DIR . 'includes/settings.php' );
101
+ global $wpp_settings;
102
+ $wpp_settings = wp_parsi_get_settings();
103
+
104
+ $files = array(
105
+ 'parsidate',
106
+ 'general',
107
+ 'fixes-archive',
108
+ 'fixes-permalinks',
109
+ 'fixes-dates',
110
+ 'fixes-misc',
111
+ 'admin/styles-fix',
112
+ 'admin/lists-fix',
113
+ 'admin/other-fix',
114
+ 'fixes-get_calendar',
115
+ 'fixes-get_archives',
116
+ 'plugins/woocommerce',
117
+ 'widget/widget_archive',
118
+ 'widget/widget_calendar'
119
+ );
120
+
121
+ foreach( $files as $file )
122
+ require_once( WP_PARSI_DIR . 'includes/' . $file . '.php' );
123
+
124
+ if ( get_locale() == 'fa_IR' )
125
+ load_textdomain( 'wp-parsidate', WP_PARSI_DIR . 'parsi-languages/fa_IR.mo' );
126
+
127
+ add_action( 'widgets_init', array( $this, 'register_widget' ) );
128
+ }
129
 
130
  /**
131
  * Sets up global variables
133
  * @since 2.0
134
  * @return void
135
  */
136
+ private function setup_vars() {
137
+ global $persian_month_names, $timezone;
138
+ $persian_month_names = array( '',
139
+ 'فروردین',
140
+ 'اردیبهشت',
141
+ 'خرداد',
142
+ 'تیر',
143
+ 'مرداد',
144
+ 'شهریور',
145
+ 'مهر',
146
+ 'آبان',
147
+ 'آذر',
148
+ 'دی',
149
+ 'بهمن',
150
+ 'اسفند'
151
+ );
152
+
153
+ $timezone = get_option( 'timezone_string' );
154
+ date_default_timezone_set( $timezone );
155
+ }
156
 
157
  /**
158
  * Register Plugin Widgets
160
  * @since 2.0
161
  * @return boolean
162
  */
163
+ public function register_widget() {
164
+ register_widget('parsidate_archive');
165
+ register_widget('parsidate_calendar');
166
+ return true;
167
+ }
168
  }
169
 
170
  return WP_Parsidate::get_instance();