Version Description
(2019-11-12) =
- Pro: Fix wrong ajax url when using one domain per language
- Pro: Fix conflict with user switching plugin when using multiple domains
- Pro: Fix latest posts block in WP 5.3
- Fix database error when attempting to sync an untranslated page parent
- Fix a conflict with the theme Neptune by Osetin
Download this release
Release Info
Developer | Chouby |
Plugin | Polylang |
Version | 2.6.6 |
Comparing to | |
See all releases |
Code changes from version 2.6.5 to 2.6.6
- frontend/frontend.php +1 -1
- modules/sync/sync.php +7 -5
- polylang.php +2 -2
- readme.txt +10 -2
frontend/frontend.php
CHANGED
@@ -164,7 +164,7 @@ class PLL_Frontend extends PLL_Base {
|
|
164 |
|
165 |
// Remove pages query when the language is set unless we do a search
|
166 |
// Take care not to break the single page, attachment and taxonomies queries!
|
167 |
-
if ( empty( $qv['post_type'] ) && ! $query->is_search && ! $query->is_singular && empty( $taxonomies ) ) {
|
168 |
$query->set( 'post_type', 'post' );
|
169 |
}
|
170 |
|
164 |
|
165 |
// Remove pages query when the language is set unless we do a search
|
166 |
// Take care not to break the single page, attachment and taxonomies queries!
|
167 |
+
if ( empty( $qv['post_type'] ) && ! $query->is_search && ! $query->is_singular && empty( $taxonomies ) && ! $query->is_category && ! $query->is_tag ) {
|
168 |
$query->set( 'post_type', 'post' );
|
169 |
}
|
170 |
|
modules/sync/sync.php
CHANGED
@@ -140,7 +140,7 @@ class PLL_Sync {
|
|
140 |
$tr_arr = $postarr;
|
141 |
unset( $tr_arr['post_parent'] );
|
142 |
|
143 |
-
// Do not udpate the translation parent if the user set a parent with no translation
|
144 |
if ( isset( $postarr['post_parent'] ) ) {
|
145 |
$post_parent = $postarr['post_parent'] ? $this->model->post->get_translation( $postarr['post_parent'], $lang ) : 0;
|
146 |
if ( ! ( $postarr['post_parent'] && ! $post_parent ) ) {
|
@@ -148,10 +148,12 @@ class PLL_Sync {
|
|
148 |
}
|
149 |
}
|
150 |
|
151 |
-
// Update all the
|
152 |
-
|
153 |
-
|
154 |
-
|
|
|
|
|
155 |
}
|
156 |
}
|
157 |
}
|
140 |
$tr_arr = $postarr;
|
141 |
unset( $tr_arr['post_parent'] );
|
142 |
|
143 |
+
// Do not udpate the translation parent if the user set a parent with no translation.
|
144 |
if ( isset( $postarr['post_parent'] ) ) {
|
145 |
$post_parent = $postarr['post_parent'] ? $this->model->post->get_translation( $postarr['post_parent'], $lang ) : 0;
|
146 |
if ( ! ( $postarr['post_parent'] && ! $post_parent ) ) {
|
148 |
}
|
149 |
}
|
150 |
|
151 |
+
// Update all the rows at once.
|
152 |
+
if ( ! empty( $tr_arr ) ) {
|
153 |
+
// Don't use wp_update_post to avoid infinite loop.
|
154 |
+
$wpdb->update( $wpdb->posts, $tr_arr, array( 'ID' => $tr_id ) );
|
155 |
+
clean_post_cache( $tr_id );
|
156 |
+
}
|
157 |
}
|
158 |
}
|
159 |
}
|
polylang.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
Plugin Name: Polylang
|
5 |
Plugin URI: https://polylang.pro
|
6 |
-
Version: 2.6.
|
7 |
Author: WP SYNTEX
|
8 |
Author uri: https://polylang.pro
|
9 |
Description: Adds multilingual capability to WordPress
|
@@ -51,7 +51,7 @@ if ( defined( 'POLYLANG_BASENAME' ) ) {
|
|
51 |
}
|
52 |
} else {
|
53 |
// Go on loading the plugin
|
54 |
-
define( 'POLYLANG_VERSION', '2.6.
|
55 |
define( 'PLL_MIN_WP_VERSION', '4.7' );
|
56 |
|
57 |
define( 'POLYLANG_FILE', __FILE__ ); // this file
|
3 |
/**
|
4 |
Plugin Name: Polylang
|
5 |
Plugin URI: https://polylang.pro
|
6 |
+
Version: 2.6.6
|
7 |
Author: WP SYNTEX
|
8 |
Author uri: https://polylang.pro
|
9 |
Description: Adds multilingual capability to WordPress
|
51 |
}
|
52 |
} else {
|
53 |
// Go on loading the plugin
|
54 |
+
define( 'POLYLANG_VERSION', '2.6.6' );
|
55 |
define( 'PLL_MIN_WP_VERSION', '4.7' );
|
56 |
|
57 |
define( 'POLYLANG_FILE', __FILE__ ); // this file
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Chouby, manooweb
|
|
3 |
Donate link: https://polylang.pro
|
4 |
Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
|
5 |
Requires at least: 4.7
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.6.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
Making WordPress multilingual
|
@@ -76,6 +76,14 @@ Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-
|
|
76 |
|
77 |
== Changelog ==
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
= 2.6.5 (2019-10-09) =
|
80 |
|
81 |
* Pro: Require ACF 5.7.11+ to activate the compatibility to avoid fatal errors with older versions
|
3 |
Donate link: https://polylang.pro
|
4 |
Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
|
5 |
Requires at least: 4.7
|
6 |
+
Tested up to: 5.3
|
7 |
+
Stable tag: 2.6.6
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
Making WordPress multilingual
|
76 |
|
77 |
== Changelog ==
|
78 |
|
79 |
+
= 2.6.6 (2019-11-12) =
|
80 |
+
|
81 |
+
* Pro: Fix wrong ajax url when using one domain per language
|
82 |
+
* Pro: Fix conflict with user switching plugin when using multiple domains
|
83 |
+
* Pro: Fix latest posts block in WP 5.3
|
84 |
+
* Fix database error when attempting to sync an untranslated page parent
|
85 |
+
* Fix a conflict with the theme Neptune by Osetin
|
86 |
+
|
87 |
= 2.6.5 (2019-10-09) =
|
88 |
|
89 |
* Pro: Require ACF 5.7.11+ to activate the compatibility to avoid fatal errors with older versions
|