Version Description
- Fix Post permalink with custom structure (%category%/%postname%/)
Download this release
Release Info
Developer | parselearn |
Plugin | Parsi Date |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.1.1
- includes/fixes-permalinks.php +2 -1
- includes/general.php +1 -1
- includes/settings.php +12 -12
- readme.txt +4 -1
- wp-parsidate.php +1 -1
includes/fixes-permalinks.php
CHANGED
@@ -291,7 +291,8 @@ function wpp_permalink( $perma, $post, $leavename = false ) {
|
|
291 |
if ( $parent = $cats[0]->parent )
|
292 |
$category = get_category_parents( $parent, false, '/', true );
|
293 |
|
294 |
-
$
|
|
|
295 |
}
|
296 |
if ( empty( $category ) ) {
|
297 |
$default_category = get_term( get_option( 'default_category' ), 'category' );
|
291 |
if ( $parent = $cats[0]->parent )
|
292 |
$category = get_category_parents( $parent, false, '/', true );
|
293 |
|
294 |
+
if($cats[0]->parent != 0)
|
295 |
+
$category .= $cats[0]->slug ;
|
296 |
}
|
297 |
if ( empty( $category ) ) {
|
298 |
$default_category = get_term( get_option( 'default_category' ), 'category' );
|
includes/general.php
CHANGED
@@ -28,7 +28,7 @@ function wp_parsi_set_locale($locale) {
|
|
28 |
if(! empty($locale_s))
|
29 |
$locale = $locale_s;
|
30 |
|
31 |
-
|
32 |
return $locale;
|
33 |
}
|
34 |
|
28 |
if(! empty($locale_s))
|
29 |
$locale = $locale_s;
|
30 |
|
31 |
+
setlocale(LC_ALL, $locale );
|
32 |
return $locale;
|
33 |
}
|
34 |
|
includes/settings.php
CHANGED
@@ -221,7 +221,7 @@ function wpp_get_registered_settings() {
|
|
221 |
'name' => __( 'Change Locale in admin', 'wp-parsidate' ),
|
222 |
'type' => 'radio',
|
223 |
'options' => $options,
|
224 |
-
'std' => '
|
225 |
'desc' => __( 'This option change WordPress locale in Admin', 'wp-parsidate' )
|
226 |
),
|
227 |
'user_lang' => array(
|
@@ -229,7 +229,7 @@ function wpp_get_registered_settings() {
|
|
229 |
'name' => __( 'Change Locale in theme', 'wp-parsidate' ),
|
230 |
'type' => 'radio',
|
231 |
'options' => $options,
|
232 |
-
'std' => '
|
233 |
'desc' => __( 'This option change WordPress locale in theme', 'wp-parsidate' )
|
234 |
),
|
235 |
|
@@ -238,7 +238,7 @@ function wpp_get_registered_settings() {
|
|
238 |
'name' => __( 'Shamsi date', 'wp-parsidate' ),
|
239 |
'type' => 'radio',
|
240 |
'options' => $options,
|
241 |
-
'std' => '
|
242 |
'desc' => __( 'By enabling this, Dates will convert to Shamsi (Jalali) dates', 'wp-parsidate' )
|
243 |
)
|
244 |
) ),
|
@@ -253,14 +253,14 @@ function wpp_get_registered_settings() {
|
|
253 |
'name' => __( 'Page title', 'wp-parsidate' ),
|
254 |
'type' => 'radio',
|
255 |
'options' => $options,
|
256 |
-
'std' => '
|
257 |
),
|
258 |
'conv_title' => array(
|
259 |
'id' => 'conv_title',
|
260 |
'name' => __( 'Post title', 'wp-parsidate' ),
|
261 |
'type' => 'radio',
|
262 |
'options' => $options,
|
263 |
-
'std' => '
|
264 |
),
|
265 |
'conv_contents' => array(
|
266 |
'id' => 'conv_contents',
|
@@ -274,35 +274,35 @@ function wpp_get_registered_settings() {
|
|
274 |
'name' => __( 'Post excerpt', 'wp-parsidate' ),
|
275 |
'type' => 'radio',
|
276 |
'options' => $options,
|
277 |
-
'std' => '
|
278 |
),
|
279 |
'conv_comments' => array(
|
280 |
'id' => 'conv_comments',
|
281 |
'name' => __( 'Comments text', 'wp-parsidate' ),
|
282 |
'type' => 'radio',
|
283 |
'options' => $options,
|
284 |
-
'std' => '
|
285 |
),
|
286 |
'conv_comment_count'=> array(
|
287 |
'id' => 'conv_comment_count',
|
288 |
'name' => __( 'Comments count', 'wp-parsidate' ),
|
289 |
'type' => 'radio',
|
290 |
'options' => $options,
|
291 |
-
'std' => '
|
292 |
),
|
293 |
'conv_dates' => array(
|
294 |
'id' => 'conv_dates',
|
295 |
'name' => __( 'Dates', 'wp-parsidate' ),
|
296 |
'type' => 'radio',
|
297 |
'options' => $options,
|
298 |
-
'std' => '
|
299 |
),
|
300 |
'conv_cats' => array(
|
301 |
'id' => 'conv_cats',
|
302 |
'name' => __( 'Categories', 'wp-parsidate' ),
|
303 |
'type' => 'radio',
|
304 |
'options' => $options,
|
305 |
-
'std' => '
|
306 |
),
|
307 |
'sep' => array(
|
308 |
'id' => 'sep',
|
@@ -313,7 +313,7 @@ function wpp_get_registered_settings() {
|
|
313 |
'name' => __( 'Fix arabic characters', 'wp-parsidate' ),
|
314 |
'type' => 'radio',
|
315 |
'options' => $options,
|
316 |
-
'std' => '
|
317 |
'desc' => __( 'Fixes arabic characters caused by wrong keyboard layouts', 'wp-parsidate' )
|
318 |
),
|
319 |
'conv_permalinks' => array(
|
@@ -321,7 +321,7 @@ function wpp_get_registered_settings() {
|
|
321 |
'name' => __( 'Fix permalinks dates', 'wp-parsidate' ),
|
322 |
'type' => 'radio',
|
323 |
'options' => $options,
|
324 |
-
'std' => '
|
325 |
'desc' => __( 'By enabling this, dates in permalinks converted to Shamsi (Jalali) date', 'wp-parsidate' )
|
326 |
)
|
327 |
) ),
|
221 |
'name' => __( 'Change Locale in admin', 'wp-parsidate' ),
|
222 |
'type' => 'radio',
|
223 |
'options' => $options,
|
224 |
+
'std' => 'enable',
|
225 |
'desc' => __( 'This option change WordPress locale in Admin', 'wp-parsidate' )
|
226 |
),
|
227 |
'user_lang' => array(
|
229 |
'name' => __( 'Change Locale in theme', 'wp-parsidate' ),
|
230 |
'type' => 'radio',
|
231 |
'options' => $options,
|
232 |
+
'std' => 'enable',
|
233 |
'desc' => __( 'This option change WordPress locale in theme', 'wp-parsidate' )
|
234 |
),
|
235 |
|
238 |
'name' => __( 'Shamsi date', 'wp-parsidate' ),
|
239 |
'type' => 'radio',
|
240 |
'options' => $options,
|
241 |
+
'std' => 'disable',
|
242 |
'desc' => __( 'By enabling this, Dates will convert to Shamsi (Jalali) dates', 'wp-parsidate' )
|
243 |
)
|
244 |
) ),
|
253 |
'name' => __( 'Page title', 'wp-parsidate' ),
|
254 |
'type' => 'radio',
|
255 |
'options' => $options,
|
256 |
+
'std' => 'disable'
|
257 |
),
|
258 |
'conv_title' => array(
|
259 |
'id' => 'conv_title',
|
260 |
'name' => __( 'Post title', 'wp-parsidate' ),
|
261 |
'type' => 'radio',
|
262 |
'options' => $options,
|
263 |
+
'std' => 'disable'
|
264 |
),
|
265 |
'conv_contents' => array(
|
266 |
'id' => 'conv_contents',
|
274 |
'name' => __( 'Post excerpt', 'wp-parsidate' ),
|
275 |
'type' => 'radio',
|
276 |
'options' => $options,
|
277 |
+
'std' => 'disable'
|
278 |
),
|
279 |
'conv_comments' => array(
|
280 |
'id' => 'conv_comments',
|
281 |
'name' => __( 'Comments text', 'wp-parsidate' ),
|
282 |
'type' => 'radio',
|
283 |
'options' => $options,
|
284 |
+
'std' => 'disable'
|
285 |
),
|
286 |
'conv_comment_count'=> array(
|
287 |
'id' => 'conv_comment_count',
|
288 |
'name' => __( 'Comments count', 'wp-parsidate' ),
|
289 |
'type' => 'radio',
|
290 |
'options' => $options,
|
291 |
+
'std' => 'disable'
|
292 |
),
|
293 |
'conv_dates' => array(
|
294 |
'id' => 'conv_dates',
|
295 |
'name' => __( 'Dates', 'wp-parsidate' ),
|
296 |
'type' => 'radio',
|
297 |
'options' => $options,
|
298 |
+
'std' => 'disable'
|
299 |
),
|
300 |
'conv_cats' => array(
|
301 |
'id' => 'conv_cats',
|
302 |
'name' => __( 'Categories', 'wp-parsidate' ),
|
303 |
'type' => 'radio',
|
304 |
'options' => $options,
|
305 |
+
'std' => 'disable'
|
306 |
),
|
307 |
'sep' => array(
|
308 |
'id' => 'sep',
|
313 |
'name' => __( 'Fix arabic characters', 'wp-parsidate' ),
|
314 |
'type' => 'radio',
|
315 |
'options' => $options,
|
316 |
+
'std' => 'disable',
|
317 |
'desc' => __( 'Fixes arabic characters caused by wrong keyboard layouts', 'wp-parsidate' )
|
318 |
),
|
319 |
'conv_permalinks' => array(
|
321 |
'name' => __( 'Fix permalinks dates', 'wp-parsidate' ),
|
322 |
'type' => 'radio',
|
323 |
'options' => $options,
|
324 |
+
'std' => 'disable',
|
325 |
'desc' => __( 'By enabling this, dates in permalinks converted to Shamsi (Jalali) date', 'wp-parsidate' )
|
326 |
)
|
327 |
) ),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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
|
8 |
|
9 |
Persian package builder for WordPress, Full RTL and Shamsi(Jalali) date
|
10 |
|
@@ -40,6 +40,9 @@ List of some features:
|
|
40 |
4. Display widget 'Jalali Date Calender' in theme
|
41 |
|
42 |
== Changelog ==
|
|
|
|
|
|
|
43 |
= 2.1 =
|
44 |
* Post Permalink Fixed
|
45 |
* WordPress SEO OpenGraph Dates fixed
|
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.1
|
8 |
|
9 |
Persian package builder for WordPress, Full RTL and Shamsi(Jalali) date
|
10 |
|
40 |
4. Display widget 'Jalali Date Calender' in theme
|
41 |
|
42 |
== Changelog ==
|
43 |
+
= 2.1.1 =
|
44 |
+
* Fix Post permalink with custom structure (%category%/%postname%/)
|
45 |
+
|
46 |
= 2.1 =
|
47 |
* Post Permalink Fixed
|
48 |
* WordPress SEO OpenGraph Dates fixed
|
wp-parsidate.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP-Parsidate
|
4 |
-
* Version: 2.1
|
5 |
* Plugin URI: http://forum.wp-parsi.com/
|
6 |
* Description: Persian package for WordPress, Adds full RTL and Shamsi (Jalali) support for: posts, comments, pages, archives, search, categories, permalinks and all admin sections and TinyMce editor, lists, quick editor. This package has Jalali archive widget.
|
7 |
* Author: WP-Parsi Team
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP-Parsidate
|
4 |
+
* Version: 2.1.1
|
5 |
* Plugin URI: http://forum.wp-parsi.com/
|
6 |
* Description: Persian package for WordPress, Adds full RTL and Shamsi (Jalali) support for: posts, comments, pages, archives, search, categories, permalinks and all admin sections and TinyMce editor, lists, quick editor. This package has Jalali archive widget.
|
7 |
* Author: WP-Parsi Team
|