wp-jalali - Version 5.0.0-RC4

Version Description

Download this release

Release Info

Developer mani_monaj
Plugin Icon 128x128 wp-jalali
Version 5.0.0-RC4
Comparing to
See all releases

Code changes from version 5.0.0-RC3 to 5.0.0-RC4

assets/css/admin_style.css CHANGED
@@ -22,5 +22,51 @@
22
.form-table th, .form-wrap label {
23
font-family: yekan !important;
24
font-size: 13px !important;
25
- font-weight: normal
26
- }
22
.form-table th, .form-wrap label {
23
font-family: yekan !important;
24
font-size: 13px !important;
25
+ font-weight: normal !important
26
+ }
27
+ .wrap h3.title {
28
+ font-family: yekan !important;
29
+ font-weight: normal !important;
30
+ }
31
+ .hndle > span {
32
+ font-family: yekan !important;
33
+ font-size: 13px !important;
34
+ font-weight: normal !important;
35
+ }
36
+ #wpcontent #wp-toolbar .menupop a, #wpcontent #wp-toolbar .menupop a .ab-label {
37
+ font-family: yekan !important;
38
+ }
39
+
40
+ .about-wrap .about-text, .about-wrap li.wp-person a.web, .about-wrap p.about-description {
41
+ font-family: yekan !important;
42
+ }
43
+
44
+ .about-wrap .feature-section h4 {
45
+ font-family: yekan !important;
46
+ font-weight: normal;
47
+ }
48
+
49
+ .about-wrap h1 {
50
+ font-family: yekan !important;
51
+ }
52
+
53
+ .zt-badge, .ztjalali-badge {
54
+ font-family: yekan !important;
55
+ font-size: 21px !important;
56
+ font-weight: normal !important;
57
+ }
58
+ .nav-tab-wrapper a.nav-tab {
59
+ font-weight: normal !important;
60
+ }
61
+
62
+ .feature-section h3 {
63
+ font-family: yekan !important;
64
+ }
65
+ .changelog h3 {
66
+ font-family: yekan;
67
+ }
68
+ .return-to-dashboard a {
69
+ font-family: yekan;
70
+ font-weight: normal;
71
+ font-size: 18px;
72
+ }
inc/wp-jalali-admin-option.php CHANGED
@@ -9,7 +9,7 @@ global $ztjalali_option;
9
<h2><?php _e('wp persian option', 'ztjalali'); ?></h2>
10
<div class="ztjalali_option_logo">
11
<a href="http://wp-persian.com" target="_BLANK" title="وردپرس فارسی">
12
- <img src="<?php echo plugins_url('/assets/img/wp-jalali-80x80.png', dirname(__FILE__)); ?>" />
13
</a>
14
</div>
15
@@ -18,140 +18,151 @@ global $ztjalali_option;
18
<table class="form-table">
19
<tbody>
20
<tr>
21
- <th scope="row"><?php _e('date option', 'ztjalali'); ?></th>
22
<td>
23
<fieldset>
24
- <legend class="screen-reader-text"><span><?php _e('date option', 'ztjalali'); ?></span></legend>
25
<label for="change_date_to_jalali">
26
<input type="checkbox" id="change_date_to_jalali" name="change_date_to_jalali" value="1" <?php checked($ztjalali_option['change_date_to_jalali'], TRUE); ?> />
27
- <?php _e('change_date_to_jalali Description', 'ztjalali'); ?>
28
- </label>
29
- <br />
30
- <label for="change_jdate_number_to_persian">
31
- <input type="checkbox" id="change_jdate_number_to_persian" name="change_jdate_number_to_persian" value="1" <?php checked($ztjalali_option['change_jdate_number_to_persian'], TRUE); ?> />
32
- <?php _e('change_jdate_number_to_persian Description', 'ztjalali'); ?>
33
</label>
34
<br />
35
<label for="change_url_date_to_jalali">
36
<input type="checkbox" id="change_url_date_to_jalali" name="change_url_date_to_jalali" value="1" <?php checked($ztjalali_option['change_url_date_to_jalali'], TRUE); ?> />
37
- <?php _e('change_url_date_to_jalali Description', 'ztjalali'); ?>
38
</label>
39
</fieldset>
40
</td>
41
</tr>
42
43
- <tr>
44
- <th scope="row"><label for="afghan_month_name"><?php _e('month_name', 'ztjalali'); ?></label></th>
45
- <td>
46
- <select id="afghan_month_name" name="afghan_month_name">
47
- <option <?php selected($ztjalali_option['afghan_month_name'], FALSE); ?> value="0"><?php _e('iran', 'ztjalali'); ?></option>
48
- <option <?php selected($ztjalali_option['afghan_month_name'], TRUE); ?> value="1"><?php _e('afghanistan', 'ztjalali'); ?></option>
49
- </select>
50
- </td>
51
- </tr>
52
53
<tr>
54
- <th scope="row"><?php _e('number option', 'ztjalali'); ?></th>
55
<td>
56
<fieldset>
57
- <legend class="screen-reader-text"><span><?php _e('number option', 'ztjalali'); ?></span></legend>
58
- <label for="change_title_number_to_persian">
59
- <input type="checkbox" id="change_title_number_to_persian" name="change_title_number_to_persian" value="1" <?php checked($ztjalali_option['change_title_number_to_persian'], TRUE); ?> />
60
- <?php _e('change_title_number_to_persian Description', 'ztjalali'); ?>
61
- </label>
62
- <br />
63
<label for="change_content_number_to_persian">
64
<input type="checkbox" id="change_content_number_to_persian" name="change_content_number_to_persian" value="1" <?php checked($ztjalali_option['change_content_number_to_persian'], TRUE); ?> />
65
- <?php _e('change_content_number_to_persian Description', 'ztjalali'); ?>
66
</label>
67
<br />
68
<label for="change_excerpt_number_to_persian">
69
<input type="checkbox" id="change_excerpt_number_to_persian" name="change_excerpt_number_to_persian" value="1" <?php checked($ztjalali_option['change_excerpt_number_to_persian'], TRUE); ?> />
70
- <?php _e('change_excerpt_number_to_persian Description', 'ztjalali'); ?>
71
</label>
72
<br />
73
<label for="change_comment_number_to_persian">
74
<input type="checkbox" id="change_comment_number_to_persian" name="change_comment_number_to_persian" value="1" <?php checked($ztjalali_option['change_comment_number_to_persian'], TRUE); ?> />
75
- <?php _e('change_comment_number_to_persian Description', 'ztjalali'); ?>
76
</label>
77
<br />
78
<label for="change_commentcount_number_to_persian">
79
<input type="checkbox" id="change_commentcount_number_to_persian" name="change_commentcount_number_to_persian" value="1" <?php checked($ztjalali_option['change_commentcount_number_to_persian'], TRUE); ?> />
80
- <?php _e('change_commentcount_number_to_persian Description', 'ztjalali'); ?>
81
</label>
82
<br />
83
<label for="change_category_number_to_persian">
84
<input type="checkbox" id="change_category_number_to_persian" name="change_category_number_to_persian" value="1" <?php checked($ztjalali_option['change_category_number_to_persian'], TRUE); ?> />
85
- <?php _e('change_category_number_to_persian Description', 'ztjalali'); ?>
86
- </label>
87
- <br />
88
- <label for="change_point_to_persian">
89
- <input type="checkbox" id="change_point_to_persian" name="change_point_to_persian" value="1" <?php checked($ztjalali_option['change_point_to_persian'], TRUE); ?> />
90
- <?php _e('change_point_to_persian Description', 'ztjalali'); ?>
91
</label>
92
</fieldset>
93
</td>
94
</tr>
95
-
96
<tr>
97
- <th scope="row"><?php _e('text option', 'ztjalali'); ?></th>
98
<td>
99
<fieldset>
100
- <legend class="screen-reader-text"><span><?php _e('text option', 'ztjalali'); ?></span></legend>
101
- <label for="change_arabic_to_persian">
102
- <input type="checkbox" id="change_arabic_to_persian" name="change_arabic_to_persian" value="1" <?php checked($ztjalali_option['change_arabic_to_persian'], TRUE); ?> />
103
- <?php _e('change_arabic_to_persian Description', 'ztjalali'); ?>
104
</label>
105
<br />
106
- <label for="change_archive_title">
107
- <input type="checkbox" id="change_archive_title" name="change_archive_title" value="1" <?php checked($ztjalali_option['change_archive_title'], TRUE); ?> />
108
- <?php _e('change_archive_title Description', 'ztjalali'); ?>
109
</label>
110
</fieldset>
111
</td>
112
- </tr>
113
114
<tr>
115
- <th scope="row"><?php _e('wp-jalali option', 'ztjalali'); ?></th>
116
<td>
117
<fieldset>
118
- <legend class="screen-reader-text"><span><?php _e('wp-jalali option', 'ztjalali'); ?></span></legend>
119
- <label for="ztjalali_admin_style">
120
- <input type="checkbox" id="ztjalali_admin_style" name="ztjalali_admin_style" value="1" <?php checked($ztjalali_option['ztjalali_admin_style'], TRUE); ?> />
121
- <?php _e('ztjalali_admin_style Description', 'ztjalali'); ?>
122
- </label>
123
-
124
<label for="save_changes_in_db">
125
<input type="checkbox" id="save_changes_in_db" name="save_changes_in_db" value="1" <?php checked($ztjalali_option['save_changes_in_db'], TRUE); ?> />
126
- <?php _e('save_changes_in_db Description', 'ztjalali'); ?>
127
- </label>
128
- </fieldset>
129
- </td>
130
- </tr>
131
-
132
- <tr>
133
- <th scope="row"><label for="persian_planet"><?php _e('persian_planet', 'ztjalali'); ?></label></th>
134
- <td>
135
- <select id="persian_planet" name="persian_planet">
136
- <option <?php selected($ztjalali_option['persian_planet'], FALSE); ?> value="0"><?php _e('wp-persian news Blog', 'ztjalali'); ?></option>
137
- <option <?php selected($ztjalali_option['persian_planet'], TRUE); ?> value="1"><?php _e('wp-persian planet', 'ztjalali'); ?></option>
138
- </select>
139
- </td>
140
- </tr>
141
-
142
- <tr>
143
- <th scope="row"><?php _e('locale option', 'ztjalali'); ?></th>
144
- <td>
145
- <fieldset>
146
- <legend class="screen-reader-text"><span><?php _e('locale option', 'ztjalali'); ?></span></legend>
147
- <label for="force_locale">
148
- <input type="checkbox" id="force_locale" name="force_locale" value="1" <?php checked($ztjalali_option['force_locale'], TRUE); ?> />
149
- <?php _e('force locale Description', 'ztjalali'); ?>
150
- </label>
151
- <br />
152
- <label for="force_timezone">
153
- <input type="checkbox" id="force_timezone" name="force_timezone" value="1" <?php checked($ztjalali_option['force_timezone'], TRUE); ?> />
154
- <?php _e('force timezone Description', 'ztjalali'); ?>
155
</label>
156
</fieldset>
157
</td>
@@ -169,7 +180,7 @@ global $ztjalali_option;
169
</tbody>
170
</table>
171
<p class="submit">
172
- <input type="submit" value="<?php _e('save changes', 'ztjalali'); ?>" class="button button-primary" id="save_wper_options" name="save_wper_options">
173
</p>
174
</form>
175
</div>
9
<h2><?php _e('wp persian option', 'ztjalali'); ?></h2>
10
<div class="ztjalali_option_logo">
11
<a href="http://wp-persian.com" target="_BLANK" title="وردپرس فارسی">
12
+ <img src="<?php echo plugins_url('/assets/img/wp-jalali-80x80.png', dirname(__FILE__)); ?>" />
13
</a>
14
</div>
15
18
<table class="form-table">
19
<tbody>
20
<tr>
21
+ <th scope="row"><label for="persian_planet"><?php _e('How to Display news in Dashboard', 'ztjalali'); ?></label></th>
22
+ <td>
23
+ <select id="persian_planet" name="persian_planet">
24
+ <option <?php selected($ztjalali_option['persian_planet'], FALSE); ?> value="0"><?php _e('wp-persian news Blog', 'ztjalali'); ?></option>
25
+ <option <?php selected($ztjalali_option['persian_planet'], TRUE); ?> value="1"><?php _e('wp-persian planet', 'ztjalali'); ?></option>
26
+ </select>
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <th scope="row"><label for="afghan_month_name"><?php _e('Visual Option', 'ztjalali'); ?></label></th>
31
+ <td>
32
+ <fieldset>
33
+ <legend class="screen-reader-text"><span><?php _e('Visual Option', 'ztjalali'); ?></span></legend>
34
+ <label for="ztjalali_admin_style">
35
+ <input type="checkbox" id="ztjalali_admin_style" name="ztjalali_admin_style" value="1" <?php checked($ztjalali_option['ztjalali_admin_style'], TRUE); ?> />
36
+ <?php _e('The font appear correction in Wordpress Dashboard, change font size and leading to better management of the environment.', 'ztjalali'); ?>
37
+ </label>
38
+ </fieldset>
39
+ </td>
40
+ </tr>
41
+ <tr>
42
+ <th scope="row"><?php _e('Date and time Settings', 'ztjalali'); ?></th>
43
<td>
44
<fieldset>
45
+ <legend class="screen-reader-text"><span><?php _e('Date and time Settings', 'ztjalali'); ?></span></legend>
46
<label for="change_date_to_jalali">
47
<input type="checkbox" id="change_date_to_jalali" name="change_date_to_jalali" value="1" <?php checked($ztjalali_option['change_date_to_jalali'], TRUE); ?> />
48
+ <?php _e('Dates in all parts of Wordpress turn from Gregorian to Shamsi.', 'ztjalali'); ?>
49
</label>
50
<br />
51
<label for="change_url_date_to_jalali">
52
<input type="checkbox" id="change_url_date_to_jalali" name="change_url_date_to_jalali" value="1" <?php checked($ztjalali_option['change_url_date_to_jalali'], TRUE); ?> />
53
+ <?php _e('Automatically turned date in posts, for example yoursite.ir/2008/04/02/post to yoursite.ir/1387/01/13/post.', 'ztjalali'); ?>
54
+ </label>
55
+ <br />
56
+ <label for="change_archive_title">
57
+ <input type="checkbox" id="change_archive_title" name="change_archive_title" value="1" <?php checked($ztjalali_option['change_archive_title'], TRUE); ?> />
58
+ <?php _e('Dates in archive title become Shamsi, for example from March 2014 to Farvardin 1387.', 'ztjalali'); ?>
59
</label>
60
+ <br />
61
+ <label for="force_timezone">
62
+ <input type="checkbox" id="force_timezone" name="force_timezone" value="1" <?php checked($ztjalali_option['force_timezone'], TRUE); ?> />
63
+ <?php _e('The default clock set Iran / Tehran, This option configured Time difference Iran/Tehran on WordPress and your Host.', 'ztjalali'); ?>
64
+ </label>
65
+ <br />
66
+ <label for="disallow_month_short_name">
67
+ <input type="checkbox" id="disallow_month_short_name" name="disallow_month_short_name" value="1" <?php checked($ztjalali_option['disallow_month_short_name'], TRUE); ?> />
68
+ <?php _e('Show Full month name, instead Short format. like: March not MAR.', 'ztjalali'); ?>
69
+ </label>
70
+ <br />
71
+ <select id="afghan_month_name" name="afghan_month_name">
72
+ <option <?php selected($ztjalali_option['afghan_month_name'], FALSE); ?> value="0"><?php _e('Iran', 'ztjalali'); ?></option>
73
+ <option <?php selected($ztjalali_option['afghan_month_name'], TRUE); ?> value="1"><?php _e('Afghanistan', 'ztjalali'); ?></option>
74
+ </select>
75
+ <br />
76
+ <?php _e('Month names according to the Iran: Farvardin, Ordibehesht, etc /Afghanistan: Hamal, Thor, etc.', 'ztjalali'); ?>
77
</fieldset>
78
</td>
79
</tr>
80
81
+
82
83
<tr>
84
+ <th scope="row"><?php _e('Convert numbers to Farsi', 'ztjalali'); ?></th>
85
<td>
86
<fieldset>
87
+ <legend class="screen-reader-text"><span><?php _e('Convert numbers to Farsi', 'ztjalali'); ?></span></legend>
88
<label for="change_content_number_to_persian">
89
<input type="checkbox" id="change_content_number_to_persian" name="change_content_number_to_persian" value="1" <?php checked($ztjalali_option['change_content_number_to_persian'], TRUE); ?> />
90
+ <?php _e('Posts', 'ztjalali'); ?>
91
</label>
92
<br />
93
+ <label for="change_title_number_to_persian">
94
+ <input type="checkbox" id="change_title_number_to_persian" name="change_title_number_to_persian" value="1" <?php checked($ztjalali_option['change_title_number_to_persian'], TRUE); ?> />
95
+ <?php _e('Posts Title', 'ztjalali'); ?>
96
+ </label>
97
+ <br />
98
+
99
<label for="change_excerpt_number_to_persian">
100
<input type="checkbox" id="change_excerpt_number_to_persian" name="change_excerpt_number_to_persian" value="1" <?php checked($ztjalali_option['change_excerpt_number_to_persian'], TRUE); ?> />
101
+ <?php _e('Excerpts', 'ztjalali'); ?>
102
+ </label>
103
+ <br />
104
+ <label for="change_jdate_number_to_persian">
105
+ <input type="checkbox" id="change_jdate_number_to_persian" name="change_jdate_number_to_persian" value="1" <?php checked($ztjalali_option['change_jdate_number_to_persian'], TRUE); ?> />
106
+ <?php _e('Dates', 'ztjalali'); ?>
107
</label>
108
<br />
109
<label for="change_comment_number_to_persian">
110
<input type="checkbox" id="change_comment_number_to_persian" name="change_comment_number_to_persian" value="1" <?php checked($ztjalali_option['change_comment_number_to_persian'], TRUE); ?> />
111
+ <?php _e('Comments', 'ztjalali'); ?>
112
</label>
113
<br />
114
<label for="change_commentcount_number_to_persian">
115
<input type="checkbox" id="change_commentcount_number_to_persian" name="change_commentcount_number_to_persian" value="1" <?php checked($ztjalali_option['change_commentcount_number_to_persian'], TRUE); ?> />
116
+ <?php _e('Comments Counter', 'ztjalali'); ?>
117
</label>
118
<br />
119
<label for="change_category_number_to_persian">
120
<input type="checkbox" id="change_category_number_to_persian" name="change_category_number_to_persian" value="1" <?php checked($ztjalali_option['change_category_number_to_persian'], TRUE); ?> />
121
+ <?php _e('Categories', 'ztjalali'); ?>
122
</label>
123
+
124
+
125
+
126
</fieldset>
127
</td>
128
</tr>
129
+
130
<tr>
131
+ <th scope="row"><?php _e('Writings Rule', 'ztjalali'); ?></th>
132
<td>
133
<fieldset>
134
+ <legend class="screen-reader-text"><span><?php _e('Writings Rule', 'ztjalali'); ?></span></legend>
135
+
136
+ <label for="change_point_to_persian">
137
+ <input type="checkbox" id="change_point_to_persian" name="change_point_to_persian" value="1" <?php checked($ztjalali_option['change_point_to_persian'], TRUE); ?> />
138
+ <?php _e('Use "٫" Instead "." As an indication of decimal numbers.', 'ztjalali'); ?>
139
</label>
140
<br />
141
+ <label for="change_arabic_to_persian">
142
+ <input type="checkbox" id="change_arabic_to_persian" name="change_arabic_to_persian" value="1" <?php checked($ztjalali_option['change_arabic_to_persian'], TRUE); ?> />
143
+ <?php _e('Automatically convert the Arabic letters (ي) and (ك) to Persian letters (ی) and (ک) during the intelligent searching for all possible combinations.', 'ztjalali'); ?>
144
</label>
145
+
146
</fieldset>
147
</td>
148
+ </tr>
149
150
<tr>
151
+ <th scope="row"><?php _e('Specific Settings', 'ztjalali'); ?></th>
152
<td>
153
<fieldset>
154
+ <legend class="screen-reader-text"><span><?php _e('Specific Settings', 'ztjalali'); ?></span></legend>
155
+
156
+
157
<label for="save_changes_in_db">
158
<input type="checkbox" id="save_changes_in_db" name="save_changes_in_db" value="1" <?php checked($ztjalali_option['save_changes_in_db'], TRUE); ?> />
159
+ <?php _e('This option helps you save the settings youve selected to database when publish post, it will lower your server resource usage, this option is recommended Offer for Popular sites,', 'ztjalali'); ?>
160
+ <br />
161
+ <?php _e('Note:', 'ztjalali'); ?>
162
+ <br />
163
+ <?php _e('1) Your configured apply only on the texts from now going to Publish.', 'ztjalali'); ?>
164
+ <br />
165
+ <?php _e('2) If you choose this option changes or amendments made ​​shall be irrevocable.', 'ztjalali'); ?>
166
</label>
167
</fieldset>
168
</td>
180
</tbody>
181
</table>
182
<p class="submit">
183
+ <input type="submit" value="<?php _e('Save Changes', 'ztjalali'); ?>" class="button button-primary" id="save_wper_options" name="save_wper_options">
184
</p>
185
</form>
186
</div>
inc/wp-jalali-admin.php CHANGED
@@ -43,12 +43,12 @@ function ztjalali_admin_save_option_page_fn() {
43
global $ztjalali_option;
44
check_admin_referer('jalali_save_options');
45
$ztjalali_option = array(
46
- 'force_locale' => !empty($_POST['force_locale']),
47
'force_timezone' => !empty($_POST['force_timezone']),
48
'change_date_to_jalali' => !empty($_POST['change_date_to_jalali']),
49
'change_jdate_number_to_persian' => !empty($_POST['change_jdate_number_to_persian']),
50
'change_url_date_to_jalali' => !empty($_POST['change_url_date_to_jalali']),
51
'afghan_month_name' => !empty($_POST['afghan_month_name']),
52
'change_title_number_to_persian' => !empty($_POST['change_title_number_to_persian']),
53
'change_content_number_to_persian' => !empty($_POST['change_content_number_to_persian']),
54
'change_excerpt_number_to_persian' => !empty($_POST['change_excerpt_number_to_persian']),
43
global $ztjalali_option;
44
check_admin_referer('jalali_save_options');
45
$ztjalali_option = array(
46
'force_timezone' => !empty($_POST['force_timezone']),
47
'change_date_to_jalali' => !empty($_POST['change_date_to_jalali']),
48
'change_jdate_number_to_persian' => !empty($_POST['change_jdate_number_to_persian']),
49
'change_url_date_to_jalali' => !empty($_POST['change_url_date_to_jalali']),
50
'afghan_month_name' => !empty($_POST['afghan_month_name']),
51
+ 'disallow_month_short_name' => !empty($_POST['disallow_month_short_name']),
52
'change_title_number_to_persian' => !empty($_POST['change_title_number_to_persian']),
53
'change_content_number_to_persian' => !empty($_POST['change_content_number_to_persian']),
54
'change_excerpt_number_to_persian' => !empty($_POST['change_excerpt_number_to_persian']),
inc/wp-jalali-filters.php CHANGED
@@ -6,10 +6,6 @@
6
//load options
7
global $ztjalali_option;
8
9
- //jalali force locale
10
- if ($ztjalali_option['force_locale'])
11
- add_filter('locale', 'ztjalali_force_locale');
12
-
13
if ($ztjalali_option['force_timezone'])
14
date_default_timezone_set('Asia/Tehran');
15
@@ -85,16 +81,6 @@ if ($ztjalali_option['change_arabic_to_persian']) {
85
// change archive title
86
if ($ztjalali_option['change_archive_title'])
87
add_filter('wp_title', 'ztjalali_ch_archive_title', 111, 3);
88
- //}
89
- /* =================================================================== */
90
-
91
- /**
92
- * force_locale filter fn
93
- * @see http://codex.wordpress.org/Plugin_API/Filter_Reference/locale
94
- */
95
- function ztjalali_force_locale() {
96
- return 'fa_IR';
97
- }
98
99
/* =================================================================== */
100
@@ -107,6 +93,9 @@ function ztjalali_force_locale() {
107
* @return string
108
*/
109
function ztjalali_ch_date_i18n($j, $req_format, $i, $gmt) {
110
return jdate($req_format, $i);
111
}
112
@@ -124,17 +113,29 @@ function ztjalali_ch_date_i18n($j, $req_format, $i, $gmt) {
124
function ztjalali_ch_archive_title($title, $sep, $seplocation) {
125
global $jdate_month_name, $wp_query;
126
$query = $wp_query->query;
127
- if (is_archive() and isset($query['monthnum'])) {
128
- if ($seplocation == 'right')
129
- $query = array_reverse($query);
130
- $query['name'] = get_option('blogname');
131
- $query['monthnum'] = $jdate_month_name[intval($query['monthnum'])];
132
- return ztjalali_ch_number_to_persian(implode(" $sep ", $query));
133
- }elseif (is_archive() and isset($query['year'])) {
134
- if ($seplocation == 'right')
135
- $query = array_reverse($query);
136
- $query['name'] = get_option('blogname');
137
- return ztjalali_ch_number_to_persian(implode(" $sep ", $query));
138
}
139
return $title;
140
}
@@ -281,24 +282,34 @@ function ztjalali_pre_get_posts_filter_fn($query) {
281
global $wpdb;
282
$query_vars = $query->query;
283
$year = $monthnum = $day = "";
284
- if (isset($query_vars['m']) AND $query_vars['m']>100001) {
285
$year= (int)(substr($query_vars['m'],0, 4));
286
if($year < 1700){
287
$monthnum= (int)(substr($query_vars['m'], 4,2));
288
- $start_date = jalali_to_gregorian($year, $monthnum, 1);
289
- $end_date = jalali_to_gregorian($year, $monthnum, jday_of_month($year, $monthnum));
290
291
$date_query = array(
292
array(
293
'after' => array(
294
'year' => $start_date[0],
295
'month' => $start_date[1],
296
- 'day' => $start_date[2] - 1,
297
),
298
'before' => array(
299
'year' => $end_date[0],
300
'month' => $end_date[1],
301
- 'day' => $end_date[2] + 1,
302
),
303
'inclusive' => TRUE,
304
),
@@ -368,12 +379,12 @@ function ztjalali_pre_get_posts_filter_fn($query) {
368
'after' => array(
369
'year' => $start_date[0],
370
'month' => $start_date[1],
371
- 'day' => $start_date[2] - 1,
372
),
373
'before' => array(
374
'year' => $end_date[0],
375
'month' => $end_date[1],
376
- 'day' => $end_date[2] + 1,
377
),
378
'inclusive' => TRUE,
379
),
@@ -399,12 +410,12 @@ function ztjalali_pre_get_posts_filter_fn($query) {
399
'after' => array(
400
'year' => $start_date[0],
401
'month' => $start_date[1],
402
- 'day' => $start_date[2] - 1,
403
),
404
'before' => array(
405
'year' => $end_date[0],
406
'month' => $end_date[1],
407
- 'day' => $end_date[2] + 1,
408
),
409
'inclusive' => TRUE,
410
),
@@ -463,7 +474,7 @@ function ztjalali_permalink_filter_fn($perma, $post, $leavename = false) {
463
$cats = get_the_category($post->ID);
464
if ($cats) {
465
usort($cats, '_usort_terms_by_ID'); // order by ID
466
- $category_object = get_term($category_object, 'category');
467
$category = $category_object->slug;
468
if ($parent = $category_object->parent)
469
$category = get_category_parents($parent, false, '/', true) . $category;
@@ -476,8 +487,9 @@ function ztjalali_permalink_filter_fn($perma, $post, $leavename = false) {
476
477
$author = "";
478
if (strpos($permalink, '%author%') !== false) {
479
- $authordata = get_user_by($post->post_author, $user_id);
480
- $author = $authordata->user_nicename;
481
}
482
483
$date = explode("-", date('Y-m-d-H-i-s', $unixtime));
@@ -500,3 +512,5 @@ function ztjalali_permalink_filter_fn($perma, $post, $leavename = false) {
500
}
501
502
/* =================================================================== */
6
//load options
7
global $ztjalali_option;
8
9
if ($ztjalali_option['force_timezone'])
10
date_default_timezone_set('Asia/Tehran');
11
81
// change archive title
82
if ($ztjalali_option['change_archive_title'])
83
add_filter('wp_title', 'ztjalali_ch_archive_title', 111, 3);
84
85
/* =================================================================== */
86
93
* @return string
94
*/
95
function ztjalali_ch_date_i18n($j, $req_format, $i, $gmt) {
96
+ global $ztjalali_option;
97
+ if($ztjalali_option['disallow_month_short_name'])
98
+ $req_format = str_replace('M', 'F', $req_format);
99
return jdate($req_format, $i);
100
}
101
113
function ztjalali_ch_archive_title($title, $sep, $seplocation) {
114
global $jdate_month_name, $wp_query;
115
$query = $wp_query->query;
116
+ $new_title='';
117
+ if (is_archive()) {
118
+ if (isset($query['monthnum'])) {
119
+ if ($query['year'] < 1700) {
120
+ $new_title = $jdate_month_name[(int) $query['monthnum']] . ' ' . $query['year'];
121
+ }
122
+ } elseif (isset($query['year'])) {
123
+ $new_title = $query['year'];
124
+ } elseif (isset($query['m'])) {
125
+ $year = substr($query['m'], 0, 4);
126
+ if ($year < 1700) {
127
+ $monthnum = (int) substr($query['m'], 4, 2);
128
+ $new_title = $jdate_month_name[$monthnum] . ' ' . $year;
129
+ }
130
+ }
131
+ if (!empty($new_title)) {
132
+ // if ($seplocation == 'right')
133
+ // $new_title.= $sep . ' ' . get_bloginfo('name');
134
+ // else
135
+ // $new_title .= get_bloginfo('name') . ' ' . $sep;
136
+ $new_title .= ' - '. get_bloginfo('name');
137
+ return ztjalali_ch_number_to_persian($new_title);
138
+ }
139
}
140
return $title;
141
}
282
global $wpdb;
283
$query_vars = $query->query;
284
$year = $monthnum = $day = "";
285
+ if (isset($query_vars['m'])){
286
$year= (int)(substr($query_vars['m'],0, 4));
287
if($year < 1700){
288
$monthnum= (int)(substr($query_vars['m'], 4,2));
289
+ if(empty($monthnum)){
290
+ $start_date = jalali_to_gregorian($year, 1, 1);
291
+ $end_date = jalali_to_gregorian($year, 12, jday_of_month($year, 12));
292
+ }else{
293
+ $day= (int)(substr($query_vars['m'], 6,2));
294
+ if(empty($day)){
295
+ $start_date = jalali_to_gregorian($year, $monthnum, 1);
296
+ $end_date = jalali_to_gregorian($year, $monthnum, jday_of_month($year, $monthnum));
297
+ }else{
298
+ $end_date = $start_date = jalali_to_gregorian($year, $monthnum,$day);
299
+ }
300
+ }
301
302
$date_query = array(
303
array(
304
'after' => array(
305
'year' => $start_date[0],
306
'month' => $start_date[1],
307
+ 'day' => $start_date[2],
308
),
309
'before' => array(
310
'year' => $end_date[0],
311
'month' => $end_date[1],
312
+ 'day' => $end_date[2],
313
),
314
'inclusive' => TRUE,
315
),
379
'after' => array(
380
'year' => $start_date[0],
381
'month' => $start_date[1],
382
+ 'day' => $start_date[2],
383
),
384
'before' => array(
385
'year' => $end_date[0],
386
'month' => $end_date[1],
387
+ 'day' => $end_date[2],
388
),
389
'inclusive' => TRUE,
390
),
410
'after' => array(
411
'year' => $start_date[0],
412
'month' => $start_date[1],
413
+ 'day' => $start_date[2],
414
),
415
'before' => array(
416
'year' => $end_date[0],
417
'month' => $end_date[1],
418
+ 'day' => $end_date[2],
419
),
420
'inclusive' => TRUE,
421
),
474
$cats = get_the_category($post->ID);
475
if ($cats) {
476
usort($cats, '_usort_terms_by_ID'); // order by ID
477
+ $category_object = get_term(reset($cats), 'category');
478
$category = $category_object->slug;
479
if ($parent = $category_object->parent)
480
$category = get_category_parents($parent, false, '/', true) . $category;
487
488
$author = "";
489
if (strpos($permalink, '%author%') !== false) {
490
+ $authordata = get_user_by('id', $post->post_author);
491
+ if(!empty($authordata))
492
+ $author = $authordata->user_nicename;
493
}
494
495
$date = explode("-", date('Y-m-d-H-i-s', $unixtime));
512
}
513
514
/* =================================================================== */
515
+
516
+
languages/ztjalali-fa_IR.mo CHANGED
Binary file
languages/ztjalali-fa_IR.po CHANGED
@@ -1,9 +1,9 @@
1
msgid ""
2
msgstr ""
3
- "Project-Id-Version: wp-jalali v5.0.0-RC\n"
4
"Report-Msgid-Bugs-To: \n"
5
"POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2014-09-04 19:29-0500\n"
7
"Last-Translator: superadmin <info@zakrot.com>\n"
8
"Language-Team: \n"
9
"MIME-Version: 1.0\n"
@@ -11,318 +11,343 @@ msgstr ""
11
"Content-Transfer-Encoding: 8bit\n"
12
"Plural-Forms: nplurals=2; plural=n != 1;\n"
13
"X-Generator: Poedit 1.6.9\n"
14
"X-Poedit-SourceCharset: utf-8\n"
15
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
- "X-Textdomain-Support: yes\n"
18
- "Language: fa_IR\n"
19
"X-Poedit-SearchPath-0: .\n"
20
21
- # @ ztjalali
22
#: inc/wp-jalali-admin-option.php:9
23
msgid "wp persian option"
24
msgstr "تنظیمات وردپرس فارسی"
25
26
- # @ ztjalali
27
- #: inc/wp-jalali-admin-option.php:143 inc/wp-jalali-admin-option.php:146
28
- msgid "locale option"
29
- msgstr "تنظیمات منطقه و زبان"
30
-
31
- # @ ztjalali
32
- #: inc/wp-jalali-admin-option.php:149
33
- msgid "force locale Description"
34
- msgstr "آیا تمایل دارید زبان سیستم بطور پیش‌فرض فارسی باشد؟"
35
-
36
- # @ ztjalali
37
- #: inc/wp-jalali-admin-option.php:154
38
- msgid "force timezone Description"
39
- msgstr "آیا تمایل دارید ساعت پیش‌فرض ایران/تهران باشد؟"
40
-
41
- # @ ztjalali
42
- #: inc/wp-jalali-admin-option.php:21 inc/wp-jalali-admin-option.php:24
43
- msgid "date option"
44
- msgstr "تنظیمات تاریخ"
45
-
46
- # @ ztjalali
47
- #: inc/wp-jalali-admin-option.php:27
48
- msgid "change_date_to_jalali Description"
49
- msgstr "آیا تمایل دارید تاریخ های میلادی به شمسی تبدیل شود؟"
50
-
51
- # @ ztjalali
52
- #: inc/wp-jalali-admin-option.php:32
53
- msgid "change_jdate_number_to_persian Description"
54
- msgstr "آیا تمایل دارید، اعداد لاتین به فارسی تبدیل گردد؟"
55
-
56
- # @ ztjalali
57
- #: inc/wp-jalali-admin-option.php:37
58
- msgid "change_url_date_to_jalali Description"
59
- msgstr "آیا تمایل دارید نشانی(url) به شمسی تبدیل شود؟"
60
-
61
- # @ ztjalali
62
- #: inc/wp-jalali-admin-option.php:44
63
- msgid "month_name"
64
- msgstr "نام ماه‌ها مطابق با کشور"
65
-
66
- # @ ztjalali
67
- #: inc/wp-jalali-admin-option.php:47
68
- msgid "iran"
69
- msgstr "ایران"
70
-
71
- # @ ztjalali
72
- #: inc/wp-jalali-admin-option.php:48
73
- msgid "afghanistan"
74
- msgstr "افغانستان"
75
-
76
- # @ ztjalali
77
- #: inc/wp-jalali-admin-option.php:54 inc/wp-jalali-admin-option.php:57
78
- msgid "number option"
79
- msgstr "تنظیمات اعداد"
80
-
81
- # @ ztjalali
82
- #: inc/wp-jalali-admin-option.php:60
83
- msgid "change_title_number_to_persian Description"
84
- msgstr "آیا تمایل دارید اعداد در عنوان نوشته به فارسی تبدیل شوند؟"
85
-
86
- # @ ztjalali
87
- #: inc/wp-jalali-admin-option.php:65
88
- msgid "change_content_number_to_persian Description"
89
- msgstr "آیا تمایل دارید اعداد در متن نوشته به فارسی تبدیل شوند؟"
90
-
91
- # @ ztjalali
92
- #: inc/wp-jalali-admin-option.php:70
93
- msgid "change_excerpt_number_to_persian Description"
94
- msgstr "آیا تمایل دارید اعداد در خلاصه نوشته به فارسی تبدیل شوند؟"
95
-
96
- # @ ztjalali
97
- #: inc/wp-jalali-admin-option.php:75
98
- msgid "change_comment_number_to_persian Description"
99
- msgstr "آیا تمایل دارید اعداد در دیدگاه‌ها به فارسی تبدیل شوند؟"
100
-
101
- # @ ztjalali
102
- #: inc/wp-jalali-admin-option.php:80
103
- msgid "change_commentcount_number_to_persian Description"
104
- msgstr "آیا تمایل دارید اعداد در شمارنده دیدگاه‌ها به فارسی تبدیل شوند؟"
105
-
106
- # @ ztjalali
107
- #: inc/wp-jalali-admin-option.php:85
108
- msgid "change_category_number_to_persian Description"
109
- msgstr "آیا تمایل دارید اعداد در دسته‌بندی‌ها به فارسی تبدیل شوند؟"
110
-
111
- # @ ztjalali
112
- #: inc/wp-jalali-admin-option.php:90
113
- msgid "change_point_to_persian Description"
114
- msgstr "آیا تمایل دارید ممیز اعداد اعشاری از نقطه به ٫ تبدیل شود؟"
115
-
116
- # @ ztjalali
117
- #: inc/wp-jalali-admin-option.php:97 inc/wp-jalali-admin-option.php:100
118
- msgid "text option"
119
- msgstr "تنظیمات متون"
120
-
121
- # @ ztjalali
122
- #: inc/wp-jalali-admin-option.php:103
123
- msgid "change_arabic_to_persian Description"
124
- msgstr ""
125
- " تبدیل خودکار حروف (ي) و (ك) عربی به (ی) و (ک) فارسی در هنگام نمایش و جستجوی "
126
- "هوشمند برای تمامی ترکیب‌های ممکن در هنگام جستجو. "
127
-
128
- # @ ztjalali
129
- #: inc/wp-jalali-admin-option.php:108
130
- msgid "change_archive_title Description"
131
- msgstr "آیا تمایل دارید نام ماهها در بایگانی شمسی باشد؟"
132
-
133
- # @ ztjalali
134
- #: inc/wp-jalali-admin-option.php:133
135
- msgid "persian_planet"
136
- msgstr "چگونگی نمایش اخبار در پیش‌خوان"
137
-
138
- # @ ztjalali
139
- #: inc/wp-jalali-admin-option.php:136 inc/wp-jalali-admin.php:106
140
msgid "wp-persian news Blog"
141
msgstr "نمایش اخبار وردپرس فارسی"
142
143
- # @ ztjalali
144
- #: inc/wp-jalali-admin-option.php:137 inc/wp-jalali-admin.php:118
145
msgid "wp-persian planet"
146
msgstr "نمایش سیاره وردپرس فارسی"
147
148
- # @ ztjalali
149
- #: inc/wp-jalali-admin-option.php:172
150
- msgid "save changes"
151
- msgstr "ذخیره تغییرات"
152
-
153
- # @ ztjalali
154
- #: inc/wp-jalali-admin.php:11
155
msgid "wp-jalali options"
156
msgstr "تنظیمات وردپرس فارسی"
157
158
- # @ ztjalali
159
#. translators: plugin header field 'Name'
160
- #: inc/wp-jalali-admin.php:12 wp-jalali.php:0
161
msgid "wp-jalali"
162
msgstr "وردپرس فارسی"
163
164
- # @ ztjalali
165
- #: inc/wp-jalali-admin.php:101
166
msgid "WordPress Development Blog"
167
msgstr "نمایش سیاره وردپرس انگلیسی"
168
169
- # @ ztjalali
170
- #: inc/wp-jalali-admin.php:113
171
msgid "Other WordPress News"
172
msgstr "نمایش اخبار وردپرس انگلیسی"
173
174
- # @ ztjalali
175
- #: widget/widget_archive.php:7 widget/widget_archive.php:14
176
- #: widget/widget_archive.php:90
177
msgid "jalali archive"
178
msgstr "بایگانی شمسی"
179
180
- # @ ztjalali
181
- #: widget/widget_archive.php:7
182
msgid "jalali archive widget"
183
msgstr "ابزارک بایگانی شمسی"
184
185
- # @ ztjalali
186
- #: widget/widget_archive.php:31 widget/widget_calendar.php:20
187
msgid "title"
188
msgstr "عنوان ابزارک"
189
190
- # @ ztjalali
191
- #: widget/widget_archive.php:38
192
msgid "yearly"
193
msgstr "سالیانه"
194
195
- # @ ztjalali
196
- #: widget/widget_archive.php:43
197
msgid "monthly"
198
msgstr "ماهیانه"
199
200
- # @ ztjalali
201
- #: widget/widget_archive.php:48
202
msgid "daily"
203
msgstr "روزانه"
204
205
- # @ ztjalali
206
- #: widget/widget_archive.php:53
207
msgid "post by post"
208
msgstr "نوشته به نوشته"
209
210
- # @ ztjalali
211
- #: widget/widget_archive.php:58
212
msgid "link count(zero to unlimit)"
213
- msgstr "تعداد(0 برای نمایش همه)"
214
215
- # @ ztjalali
216
- #: widget/widget_archive.php:65
217
msgid "show count of post (not work in post by post)"
218
- msgstr "نمایش تعداد نوشته ها (فقط برای بایگانی روزانه و ماهیانه و سالیانه)"
219
220
- # @ ztjalali
221
- #: widget/widget_archive.php:71
222
msgid "show dropdown list (not work in post by post)"
223
- msgstr "نمایش به صورت لیست بازشو (فقط برای بایگانی روزانه و ماهیانه و سالیانه)"
224
225
- # @ ztjalali
226
- #: widget/widget_calendar.php:7 widget/widget_calendar.php:13
227
- #: widget/widget_calendar.php:43
228
msgid "jalali calendar"
229
msgstr "تقویم شمسی"
230
231
- # @ ztjalali
232
- #: widget/widget_calendar.php:7
233
msgid "jalali calendar widget"
234
msgstr "ابزارک تقویم شمسی"
235
236
- # @ ztjalali
237
- #: widget/widget_calendar.php:27
238
msgid "jcalendar short name of week"
239
msgstr "نمایش نام ایام هفته بصورت خلاصه"
240
241
- # @ default
242
#. translators: Calendar caption: 1: month name, 2: 4-digit year
243
- #: widget/widget_calendar.php:166
244
#, php-format
245
msgctxt "calendar caption"
246
msgid "%1$s %2$s"
247
msgstr ""
248
249
- # @ ztjalali
250
- #: widget/widget_calendar.php:198 widget/widget_calendar.php:200
251
- #: widget/widget_calendar.php:210 widget/widget_calendar.php:212
252
#, php-format
253
msgid "View posts for %1$s %2$s"
254
- msgstr "نمایش پست های %1$s %2$s"
255
256
- # @ ztjalali
257
- #: wp-jalali-init.php:156
258
msgid "Powered BY persian wordpress"
259
msgstr "قدرت گرفته از وردپرس فارسی"
260
261
- # @ ztjalali
262
- #: inc/wp-jalali-admin-option.php:115 inc/wp-jalali-admin-option.php:118
263
- msgid "wp-jalali option"
264
- msgstr "تنظیمات افزونه جلالی"
265
-
266
- # @ ztjalali
267
- #: inc/wp-jalali-admin-option.php:126
268
- msgid "save_changes_in_db Description"
269
- msgstr ""
270
- "آیا تمایل دارید تغییرات حروف عربی و اعداد در هنگام ذخیره کردن نوشته صورت "
271
- "بگیرد؟ <br/>به این ترتیب عملیات اصلاح فقط یک بار (در هنگام ذخیره نمودن) "
272
- "انجام می گیرد و کارایی افزونه بیشتر خواهد شد."
273
-
274
- # @ ztjalali
275
- #: inc/wp-jalali-admin-option.php:121
276
- msgid "ztjalali_admin_style Description"
277
- msgstr ""
278
- "اصلاح ظاهر مدیریت شامل تغییر قلم ،‌ تغییر اندازه قلم ها و ... که منجر به زیبا "
279
- "تر شدن محیط مدیریت می شود."
280
-
281
- # @ ztjalali
282
- #: wp-jalali-init.php:93
283
msgid "setting"
284
msgstr "تنظیمات"
285
286
- # @ ztjalali
287
- #: inc/wp-jalali-admin.php:20
288
msgid "wp-jalali help page"
289
msgstr "راهنما"
290
291
- # @ ztjalali
292
- #: inc/wp-jalali-admin.php:20
293
msgid "wp-jalali help"
294
msgstr "راهنما"
295
296
- # @ ztjalali
297
- #. translators: plugin header field 'PluginURI'
298
- #: wp-jalali.php:0
299
- msgid "http://www.wp-persian.com/wp-jalali"
300
- msgstr ""
301
-
302
- # @ ztjalali
303
#. translators: plugin header field 'Description'
304
#: wp-jalali.php:0
305
- msgid ""
306
- "Full Jalali calendar support for Wordpress and localization improvements for "
307
- "Persian/Afghan/Tajik users."
308
- msgstr ""
309
- "پشتیبانی کامل از تقویم جلالی، محلی‌سازی و بهبوده یافته برای کابران فارسی زبان/"
310
- "افغان/تاجیک وردپرس."
311
312
- # @ ztjalali
313
#. translators: plugin header field 'Author'
314
#: wp-jalali.php:0
315
msgid "Zakrot Web Solutions (in collaboration with WP-Persian team)"
316
msgstr "زاکروت، راهکارهای مبتنی بر وب - با همکاری تیم وردپرس فارسی"
317
318
- # @ ztjalali
319
#. translators: plugin header field 'AuthorURI'
320
#: wp-jalali.php:0
321
msgid "http://zakrot.com/"
322
msgstr ""
323
324
- # @ ztjalali
325
#. translators: plugin header field 'Version'
326
#: wp-jalali.php:0
327
- msgid "5.0.0-RC"
328
msgstr ""
1
msgid ""
2
msgstr ""
3
+ "Project-Id-Version: wp-jalali v5.0.0-RC3\n"
4
"Report-Msgid-Bugs-To: \n"
5
"POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2014-09-09 11:34:36+0000\n"
7
"Last-Translator: superadmin <info@zakrot.com>\n"
8
"Language-Team: \n"
9
"MIME-Version: 1.0\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
"Plural-Forms: nplurals=2; plural=n != 1;\n"
13
"X-Generator: Poedit 1.6.9\n"
14
+ "X-Poedit-Language: \n"
15
+ "X-Poedit-Country: \n"
16
"X-Poedit-SourceCharset: utf-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
18
+ "X-Poedit-Basepath: \n"
19
+ "X-Poedit-Bookmarks: \n"
20
"X-Poedit-SearchPath-0: .\n"
21
+ "X-Textdomain-Support: yes"
22
23
#: inc/wp-jalali-admin-option.php:9
24
+ #@ ztjalali
25
msgid "wp persian option"
26
msgstr "تنظیمات وردپرس فارسی"
27
28
+ #: inc/wp-jalali-admin-option.php:24
29
+ #: inc/wp-jalali-admin.php:111
30
+ #@ ztjalali
31
msgid "wp-persian news Blog"
32
msgstr "نمایش اخبار وردپرس فارسی"
33
34
+ #: inc/wp-jalali-admin-option.php:25
35
+ #: inc/wp-jalali-admin.php:123
36
+ #@ ztjalali
37
msgid "wp-persian planet"
38
msgstr "نمایش سیاره وردپرس فارسی"
39
40
+ #: inc/wp-jalali-admin.php:12
41
+ #@ ztjalali
42
msgid "wp-jalali options"
43
msgstr "تنظیمات وردپرس فارسی"
44
45
#. translators: plugin header field 'Name'
46
+ #: inc/wp-jalali-admin.php:13
47
+ #: wp-jalali.php:0
48
+ #@ ztjalali
49
msgid "wp-jalali"
50
msgstr "وردپرس فارسی"
51
52
+ #: inc/wp-jalali-admin.php:106
53
+ #@ ztjalali
54
msgid "WordPress Development Blog"
55
msgstr "نمایش سیاره وردپرس انگلیسی"
56
57
+ #: inc/wp-jalali-admin.php:118
58
+ #@ ztjalali
59
msgid "Other WordPress News"
60
msgstr "نمایش اخبار وردپرس انگلیسی"
61
62
+ #: widget/widget_archive.php:9
63
+ #: widget/widget_archive.php:16
64
+ #: widget/widget_archive.php:92
65
+ #@ ztjalali
66
msgid "jalali archive"
67
msgstr "بایگانی شمسی"
68
69
+ #: widget/widget_archive.php:9
70
+ #@ ztjalali
71
msgid "jalali archive widget"
72
msgstr "ابزارک بایگانی شمسی"
73
74
+ #: widget/widget_archive.php:33
75
+ #: widget/widget_calendar.php:22
76
+ #@ ztjalali
77
msgid "title"
78
msgstr "عنوان ابزارک"
79
80
+ #: widget/widget_archive.php:40
81
+ #@ ztjalali
82
msgid "yearly"
83
msgstr "سالیانه"
84
85
+ #: widget/widget_archive.php:45
86
+ #@ ztjalali
87
msgid "monthly"
88
msgstr "ماهیانه"
89
90
+ #: widget/widget_archive.php:50
91
+ #@ ztjalali
92
msgid "daily"
93
msgstr "روزانه"
94
95
+ #: widget/widget_archive.php:55
96
+ #@ ztjalali
97
msgid "post by post"
98
msgstr "نوشته به نوشته"
99
100
+ #: widget/widget_archive.php:60
101
+ #@ ztjalali
102
msgid "link count(zero to unlimit)"
103
+ msgstr "تعداد (0 برای نمایش همه)"
104
105
+ #: widget/widget_archive.php:67
106
+ #@ ztjalali
107
msgid "show count of post (not work in post by post)"
108
+ msgstr "نمایش تعداد نوشته‌ها (به استثنای حالت نوشته به نوشته)"
109
110
+ #: widget/widget_archive.php:73
111
+ #@ ztjalali
112
msgid "show dropdown list (not work in post by post)"
113
+ msgstr "نمایش به صورت لیست بازشو (به استثنای حالت نوشته به نوشته)"
114
115
+ #: widget/widget_calendar.php:9
116
+ #: widget/widget_calendar.php:15
117
+ #: widget/widget_calendar.php:45
118
+ #@ ztjalali
119
msgid "jalali calendar"
120
msgstr "تقویم شمسی"
121
122
+ #: widget/widget_calendar.php:9
123
+ #@ ztjalali
124
msgid "jalali calendar widget"
125
msgstr "ابزارک تقویم شمسی"
126
127
+ #: widget/widget_calendar.php:29
128
+ #@ ztjalali
129
msgid "jcalendar short name of week"
130
msgstr "نمایش نام ایام هفته بصورت خلاصه"
131
132
#. translators: Calendar caption: 1: month name, 2: 4-digit year
133
+ #: widget/widget_calendar.php:168
134
#, php-format
135
+ #@ default
136
msgctxt "calendar caption"
137
msgid "%1$s %2$s"
138
msgstr ""
139
140
+ #: widget/widget_calendar.php:200
141
+ #: widget/widget_calendar.php:202
142
+ #: widget/widget_calendar.php:212
143
+ #: widget/widget_calendar.php:214
144
#, php-format
145
+ #@ ztjalali
146
msgid "View posts for %1$s %2$s"
147
+ msgstr "نمایش نوشته‌های %1$s %2$s"
148
149
+ #: wp-jalali-init.php:184
150
+ #@ ztjalali
151
msgid "Powered BY persian wordpress"
152
msgstr "قدرت گرفته از وردپرس فارسی"
153
154
+ #: wp-jalali-init.php:119
155
+ #@ ztjalali
156
msgid "setting"
157
msgstr "تنظیمات"
158
159
+ #: inc/wp-jalali-admin.php:21
160
+ #@ ztjalali
161
msgid "wp-jalali help page"
162
msgstr "راهنما"
163
164
+ #: inc/wp-jalali-admin.php:21
165
+ #@ ztjalali
166
msgid "wp-jalali help"
167
msgstr "راهنما"
168
169
#. translators: plugin header field 'Description'
170
#: wp-jalali.php:0
171
+ #@ ztjalali
172
+ msgid "Full Jalali calendar support for Wordpress and localization improvements for Persian/Afghan/Tajik users."
173
+ msgstr "پشتیبانی کامل از تقویم جلالی، محلی‌سازی و بهبوده یافته برای کابران فارسی زبان/افغان/تاجیک وردپرس."
174
175
#. translators: plugin header field 'Author'
176
#: wp-jalali.php:0
177
+ #@ ztjalali
178
msgid "Zakrot Web Solutions (in collaboration with WP-Persian team)"
179
msgstr "زاکروت، راهکارهای مبتنی بر وب - با همکاری تیم وردپرس فارسی"
180
181
#. translators: plugin header field 'AuthorURI'
182
#: wp-jalali.php:0
183
+ #@ ztjalali
184
msgid "http://zakrot.com/"
185
msgstr ""
186
187
+ #: inc/wp-jalali-admin-option.php:21
188
+ #@ ztjalali
189
+ msgid "How to Display news in Dashboard"
190
+ msgstr "چگونگی نمایش اخبار در پیشخوان"
191
+
192
+ #: inc/wp-jalali-admin-option.php:30
193
+ #: inc/wp-jalali-admin-option.php:33
194
+ #@ ztjalali
195
+ msgid "Visual Option"
196
+ msgstr "تنظیمات دیداری"
197
+
198
+ #: inc/wp-jalali-admin-option.php:36
199
+ #@ ztjalali
200
+ msgid "The font appear correction in Wordpress Dashboard, change font size and leading to better management of the environment."
201
+ msgstr "اصلاح ظاهر مدیریت شامل تغییر قلم،‌ تغییر اندازه قلم‌ها و... که منجر به زیباتر شدن محیط مدیریت می‌شود."
202
+
203
+ #: inc/wp-jalali-admin-option.php:42
204
+ #: inc/wp-jalali-admin-option.php:45
205
+ #@ ztjalali
206
+ msgid "Date and time Settings"
207
+ msgstr "تنظیمات تاریخ و ساعت"
208
+
209
+ #: inc/wp-jalali-admin-option.php:48
210
+ #@ ztjalali
211
+ msgid "Dates in all parts of Wordpress turn from Gregorian to Shamsi."
212
+ msgstr "تاریخ تمامی بخش‌های وردپرس از میلادی به شمسی تبدیل شود."
213
+
214
+ #: inc/wp-jalali-admin-option.php:53
215
+ #@ ztjalali
216
+ msgid "Automatically turned date in posts, for example yoursite.ir/2008/04/02/post to yoursite.ir/1387/01/13/post."
217
+ msgstr "تبدیل خودکار تاریخ در نوشته‌ها، مثلا از yoursite.ir/2008/04/02/post به yoursite.ir/1387/01/13/post."
218
+
219
+ #: inc/wp-jalali-admin-option.php:58
220
+ #@ ztjalali
221
+ msgid "Dates in archive title become Shamsi, for example from March 2014 to Farvardin 1387."
222
+ msgstr "تاریخ در عنوان بایگانی مطالب به تاریخ شمسی تبدیل شود، مثلا از مارس 2014 به فروردین ۱۳۸۷."
223
+
224
+ #: inc/wp-jalali-admin-option.php:63
225
+ #@ ztjalali
226
+ msgid "The default clock set Iran / Tehran, This option configured Time difference Iran/Tehran on WordPress and your Host."
227
+ msgstr "ساعت پیش‌فرض ایران/تهران باشد، این گزینه به شما کمک می‌کند اختلاف ساعت ایران/تهران در وردپرس با سرور سایت شما تنظیم شود."
228
+
229
+ #: inc/wp-jalali-admin-option.php:72
230
+ #@ ztjalali
231
+ msgid "Iran"
232
+ msgstr "ایران"
233
+
234
+ #: inc/wp-jalali-admin-option.php:73
235
+ #@ ztjalali
236
+ msgid "Afghanistan"
237
+ msgstr "افغانستان"
238
+
239
+ #: inc/wp-jalali-admin-option.php:76
240
+ #@ ztjalali
241
+ msgid "Month names according to the Iran: Farvardin, Ordibehesht, etc /Afghanistan: Hamal, Thor, etc."
242
+ msgstr "نام ماه‌ها مطابق با کشور ایران: فروردین، اردیبهشت و... /افغانستان: حمل، ثور و... ."
243
+
244
+ #: inc/wp-jalali-admin-option.php:84
245
+ #: inc/wp-jalali-admin-option.php:87
246
+ #@ ztjalali
247
+ msgid "Convert numbers to Farsi"
248
+ msgstr "تبدیل اعداد به فارسی"
249
+
250
+ #: inc/wp-jalali-admin-option.php:90
251
+ #@ ztjalali
252
+ msgid "Posts"
253
+ msgstr "متن نوشته‌ها"
254
+
255
+ #: inc/wp-jalali-admin-option.php:95
256
+ #@ ztjalali
257
+ msgid "Posts Title"
258
+ msgstr "عنوان نوشته‌ها"
259
+
260
+ #: inc/wp-jalali-admin-option.php:101
261
+ #@ ztjalali
262
+ msgid "Excerpts"
263
+ msgstr "متن خلاصه‌ها"
264
+
265
+ #: inc/wp-jalali-admin-option.php:106
266
+ #@ ztjalali
267
+ msgid "Dates"
268
+ msgstr "تاریخ‌ها"
269
+
270
+ #: inc/wp-jalali-admin-option.php:111
271
+ #@ ztjalali
272
+ msgid "Comments"
273
+ msgstr "متن دیدگاه‌ها"
274
+
275
+ #: inc/wp-jalali-admin-option.php:116
276
+ #@ ztjalali
277
+ msgid "Comments Counter"
278
+ msgstr "تعداد دیدگاه‌ها"
279
+
280
+ #: inc/wp-jalali-admin-option.php:121
281
+ #@ ztjalali
282
+ msgid "Categories"
283
+ msgstr "فهرست دسته‌ها"
284
+
285
+ #: inc/wp-jalali-admin-option.php:131
286
+ #: inc/wp-jalali-admin-option.php:134
287
+ #@ ztjalali
288
+ msgid "Writings Rule"
289
+ msgstr "قواعد نگارشی"
290
+
291
+ #: inc/wp-jalali-admin-option.php:138
292
+ #@ ztjalali
293
+ msgid "Use \"٫\" Instead \".\" As an indication of decimal numbers."
294
+ msgstr "استفاده از «٫» به جای «.» به عنوان نشانه اعداد اعشاری."
295
+
296
+ #: inc/wp-jalali-admin-option.php:143
297
+ #@ ztjalali
298
+ msgid "Automatically convert the Arabic letters (ي) and (ك) to Persian letters (ی) and (ک) during the intelligent searching for all possible combinations."
299
+ msgstr "تبدیل خودکار حروف «ي» و «ك» عربی به «ی» و «ک» فارسی در هنگام نمایش و جستجوی هوشمند برای تمامی ترکیب‌های ممکن در هنگام جستجو."
300
+
301
+ #: inc/wp-jalali-admin-option.php:151
302
+ #: inc/wp-jalali-admin-option.php:154
303
+ #@ ztjalali
304
+ msgid "Specific Settings"
305
+ msgstr "تنظیمات خاص"
306
+
307
+ #: inc/wp-jalali-admin-option.php:159
308
+ #@ ztjalali
309
+ msgid "This option helps you save the settings youve selected to database when publish post, it will lower your server resource usage, this option is recommended Offer for Popular sites,"
310
+ msgstr "این گزینه به شما کمک می‌کند تنظیمات مورد نظری که در بالا انتخاب کردید هنگام ذخیره نوشته صورت بگیرد، به این صورت میزان مصرف منابع سرور شما کمتر می‌شود، این گزینه به سایت‌های پربازدید توصیه می‌شود،"
311
+
312
+ #: inc/wp-jalali-admin-option.php:161
313
+ #@ ztjalali
314
+ msgid "Note:"
315
+ msgstr "دقت داشته باشید:"
316
+
317
+ #: inc/wp-jalali-admin-option.php:163
318
+ #@ ztjalali
319
+ msgid "1) Your configured apply only on the texts from now going to Publish."
320
+ msgstr "۱) تغییرات تنها بر روی نوشته‌هایی که از حالا به بعد ذخیره می‌کنید اعمال می‌شود."
321
+
322
+ #: inc/wp-jalali-admin-option.php:165
323
+ #@ ztjalali
324
+ msgid "2) If you choose this option changes or amendments made ​​shall be irrevocable."
325
+ msgstr "۲) در صورت انتخاب این گزینه تغییرات و اصلاحیه‌های انجام شده غیرقابل برگشت خواهند بود."
326
+
327
+ #: inc/wp-jalali-admin-option.php:170
328
+ #@ ztjalali
329
+ msgid "If you use other WordPress plugins for Shamsi, just check this option to associate functions to be supported."
330
+ msgstr "اگر از افزونه‌های دیگری برای شمسی کردن وردپرس استفاده می‌کنید، تنها کافیست این گزینه را تیک بزنید تا از توابع وابسته پشتیبانی شود."
331
+
332
+ #: inc/wp-jalali-admin-option.php:188
333
+ #@ ztjalali
334
+ msgid "Save Changes"
335
+ msgstr "بروز رسانی"
336
+
337
+ #. translators: plugin header field 'PluginURI'
338
+ #: wp-jalali.php:0
339
+ #@ ztjalali
340
+ msgid "http://wp-persian.com/wp-jalali"
341
+ msgstr ""
342
+
343
#. translators: plugin header field 'Version'
344
#: wp-jalali.php:0
345
+ #@ ztjalali
346
+ msgid "5.0.0-RC3"
347
msgstr ""
348
+
349
+ #: inc/wp-jalali-admin-option.php:68
350
+ #@ ztjalali
351
+ msgid "Show Full month name, instead Short format. like: March not MAR."
352
+ msgstr "نمایش نام ماه بصورت کامل، مثال: «اردیبهشت» به جای «ارد»."
353
+
lib/date.php CHANGED
@@ -177,9 +177,9 @@ function jdate($format, $timestamp = NULL, $timezone = false, $fanum = NULL) {
177
case 'a':
178
case 'A':
179
if (date('a', $timestamp) == 'am') {
180
- $result .= (($par == 'a') ? '.ق.ظ' : 'قبل از ظهر');
181
} else {
182
- $result .= (($par == 'a') ? '.ب.ظ' : 'بعد از ظهر');
183
}
184
break;
185
177
case 'a':
178
case 'A':
179
if (date('a', $timestamp) == 'am') {
180
+ $result .= (($par == 'a') ? 'ق.ظ' : 'قبل از ظهر');
181
} else {
182
+ $result .= (($par == 'a') ? 'ب.ظ' : 'بعد از ظهر');
183
}
184
break;
185
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.wp-persian.com/donate
4
Tags: Calendar Conversion, Persian, Farsi, Afghan, Tajik, Jalali, Date, Calendar, i18n, l10n
5
Tested up to: 4.0.0
6
Requires at least: 3.9
7
- Stable tag: 5.0.0-RC3
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
4
Tags: Calendar Conversion, Persian, Farsi, Afghan, Tajik, Jalali, Date, Calendar, i18n, l10n
5
Tested up to: 4.0.0
6
Requires at least: 3.9
7
+ Stable tag: 5.0.0-RC4
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
widget/widget_archive.php CHANGED
@@ -139,7 +139,7 @@ function ztjalali_archive_widget($type ='monthly',$format='html',$show_post_coun
139
global $wpdb, $jdate_month_name, $ztjalali_option;
140
if ($type === "yearly") {
141
$YearlyQry = $wpdb->get_results(
142
- "SELECT DATE_FORMAT( post_date ,'%Y-%m' ) as date,
143
count(ID) as count,
144
YEAR(post_date) AS `year`,
145
MONTH(post_date) AS `month`,
139
global $wpdb, $jdate_month_name, $ztjalali_option;
140
if ($type === "yearly") {
141
$YearlyQry = $wpdb->get_results(
142
+ "SELECT DATE_FORMAT( post_date ,'%Y-%m-%d' ) as date,
143
count(ID) as count,
144
YEAR(post_date) AS `year`,
145
MONTH(post_date) AS `month`,
wp-jalali-config.php CHANGED
@@ -4,13 +4,13 @@
4
* this config use in install moment.
5
*/
6
return array(
7
- 'force_locale' => FALSE,
8
'force_timezone' => FALSE, //doing: test
9
10
'change_date_to_jalali' => TRUE,
11
'change_jdate_number_to_persian' => TRUE,
12
'change_url_date_to_jalali' => FALSE,
13
'afghan_month_name' => FALSE,
14
15
'change_title_number_to_persian' => TRUE,
16
'change_content_number_to_persian' => TRUE,
4
* this config use in install moment.
5
*/
6
return array(
7
'force_timezone' => FALSE, //doing: test
8
9
'change_date_to_jalali' => TRUE,
10
'change_jdate_number_to_persian' => TRUE,
11
'change_url_date_to_jalali' => FALSE,
12
'afghan_month_name' => FALSE,
13
+ 'disallow_month_short_name' => TRUE,
14
15
'change_title_number_to_persian' => TRUE,
16
'change_content_number_to_persian' => TRUE,
wp-jalali-init.php CHANGED
@@ -9,8 +9,13 @@ function ztjalali_installer() {
9
if (!($options = ztjalali_get_old_options()))
10
$options = include JALALI_DIR . 'wp-jalali-config.php';
11
add_option('ztjalali_options', json_encode($options));
12
}
13
-
14
$current_version = ztjalali_get_plugin_version();
15
add_option('ztjalali_version',$current_version )
16
OR update_option('ztjalali_version', $current_version );
@@ -32,12 +37,12 @@ function ztjalali_get_old_options() {
32
return false;
33
/* ------------------------------------------------------ */
34
return array(
35
- 'force_locale' => FALSE,
36
'force_timezone' => FALSE, //doing: test
37
'change_date_to_jalali' => ($mps_jd_optionsDB['mps_jd_autodate']) ? TRUE : FALSE,
38
'change_jdate_number_to_persian' => ($mps_jd_optionsDB['mps_jd_farsinum_date']) ? TRUE : FALSE,
39
'change_url_date_to_jalali' => ($mps_jd_optionsDB['mps_jd_jperma']) ? TRUE : FALSE,
40
'afghan_month_name' => ($mps_jd_optionsDB['mps_jd_country'] == 'AF') ? TRUE : FALSE,
41
'change_title_number_to_persian' => ($mps_jd_optionsDB['mps_jd_farsinum_title']) ? TRUE : FALSE,
42
'change_content_number_to_persian' => ($mps_jd_optionsDB['mps_jd_farsinum_content']) ? TRUE : FALSE,
43
'change_excerpt_number_to_persian' => ($mps_jd_optionsDB['mps_jd_farsinum_content']) ? TRUE : FALSE,
9
if (!($options = ztjalali_get_old_options()))
10
$options = include JALALI_DIR . 'wp-jalali-config.php';
11
add_option('ztjalali_options', json_encode($options));
12
+ }else{
13
+ $default_options = include JALALI_DIR . 'wp-jalali-config.php';
14
+ $options =json_decode($options,TRUE);
15
+ $options = array_merge($default_options,$options);
16
+ update_option('ztjalali_options', json_encode($options));
17
}
18
+
19
$current_version = ztjalali_get_plugin_version();
20
add_option('ztjalali_version',$current_version )
21
OR update_option('ztjalali_version', $current_version );
37
return false;
38
/* ------------------------------------------------------ */
39
return array(
40
'force_timezone' => FALSE, //doing: test
41
'change_date_to_jalali' => ($mps_jd_optionsDB['mps_jd_autodate']) ? TRUE : FALSE,
42
'change_jdate_number_to_persian' => ($mps_jd_optionsDB['mps_jd_farsinum_date']) ? TRUE : FALSE,
43
'change_url_date_to_jalali' => ($mps_jd_optionsDB['mps_jd_jperma']) ? TRUE : FALSE,
44
'afghan_month_name' => ($mps_jd_optionsDB['mps_jd_country'] == 'AF') ? TRUE : FALSE,
45
+ 'disallow_month_short_name' => TRUE,
46
'change_title_number_to_persian' => ($mps_jd_optionsDB['mps_jd_farsinum_title']) ? TRUE : FALSE,
47
'change_content_number_to_persian' => ($mps_jd_optionsDB['mps_jd_farsinum_content']) ? TRUE : FALSE,
48
'change_excerpt_number_to_persian' => ($mps_jd_optionsDB['mps_jd_farsinum_content']) ? TRUE : FALSE,
wp-jalali.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: wp-jalali
4
Plugin URI: http://wp-persian.com/wp-jalali
5
Description: Full Jalali calendar support for Wordpress and localization improvements for Persian/Afghan/Tajik users.
6
- Version: 5.0.0-RC3
7
Author: Zakrot Web Solutions (in collaboration with WP-Persian team)
8
Author URI: http://zakrot.com/
9
Text Domain: ztjalali
3
Plugin Name: wp-jalali
4
Plugin URI: http://wp-persian.com/wp-jalali
5
Description: Full Jalali calendar support for Wordpress and localization improvements for Persian/Afghan/Tajik users.
6
+ Version: 5.0.0-RC4
7
Author: Zakrot Web Solutions (in collaboration with WP-Persian team)
8
Author URI: http://zakrot.com/
9
Text Domain: ztjalali