Version Description
(2021-06-22) =
- Fix a conflict with the WooCommerce cart translation and cache plugins #876
Download this release
Release Info
Developer | Chouby |
Plugin | Polylang |
Version | 3.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.6
- flags/cy.png +0 -0
- flags/et.png +0 -0
- flags/vi.png +0 -0
- integrations/cache/cache-compat.php +6 -4
- polylang.php +2 -2
- readme.txt +5 -1
flags/cy.png
CHANGED
File without changes
|
flags/et.png
CHANGED
File without changes
|
flags/vi.png
CHANGED
File without changes
|
integrations/cache/cache-compat.php
CHANGED
@@ -83,9 +83,7 @@ class PLL_Cache_Compat {
|
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
-
*
|
87 |
-
*
|
88 |
-
* This allows cache plugins to clean the right post type archive cache.
|
89 |
*
|
90 |
* @since 3.0.5
|
91 |
*
|
@@ -93,8 +91,12 @@ class PLL_Cache_Compat {
|
|
93 |
*/
|
94 |
public function clean_post_cache( $post_id ) {
|
95 |
$lang = PLL()->model->post->get_language( $post_id );
|
|
|
96 |
if ( $lang ) {
|
97 |
-
|
|
|
|
|
|
|
98 |
}
|
99 |
}
|
100 |
}
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
+
* Allows cache plugins to clean the right post type archive cache when cleaning a post cache.
|
|
|
|
|
87 |
*
|
88 |
* @since 3.0.5
|
89 |
*
|
91 |
*/
|
92 |
public function clean_post_cache( $post_id ) {
|
93 |
$lang = PLL()->model->post->get_language( $post_id );
|
94 |
+
|
95 |
if ( $lang ) {
|
96 |
+
$filter_callback = function ( $link, $post_type ) use ( $lang ) {
|
97 |
+
return pll_is_translated_post_type( $post_type ) && 'post' !== $post_type ? PLL()->links_model->switch_language_in_link( $link, $lang ) : $link;
|
98 |
+
};
|
99 |
+
add_filter( 'post_type_archive_link', $filter_callback, 99, 2 );
|
100 |
}
|
101 |
}
|
102 |
}
|
polylang.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Polylang
|
11 |
* Plugin URI: https://polylang.pro
|
12 |
* Description: Adds multilingual capability to WordPress
|
13 |
-
* Version: 3.0.
|
14 |
* Requires at least: 5.1
|
15 |
* Requires PHP: 5.6
|
16 |
* Author: WP SYNTEX
|
@@ -53,7 +53,7 @@ if ( defined( 'POLYLANG_VERSION' ) ) {
|
|
53 |
}
|
54 |
} else {
|
55 |
// Go on loading the plugin
|
56 |
-
define( 'POLYLANG_VERSION', '3.0.
|
57 |
define( 'PLL_MIN_WP_VERSION', '5.1' );
|
58 |
define( 'PLL_MIN_PHP_VERSION', '5.6' );
|
59 |
|
10 |
* Plugin Name: Polylang
|
11 |
* Plugin URI: https://polylang.pro
|
12 |
* Description: Adds multilingual capability to WordPress
|
13 |
+
* Version: 3.0.6
|
14 |
* Requires at least: 5.1
|
15 |
* Requires PHP: 5.6
|
16 |
* Author: WP SYNTEX
|
53 |
}
|
54 |
} else {
|
55 |
// Go on loading the plugin
|
56 |
+
define( 'POLYLANG_VERSION', '3.0.6' );
|
57 |
define( 'PLL_MIN_WP_VERSION', '5.1' );
|
58 |
define( 'PLL_MIN_PHP_VERSION', '5.6' );
|
59 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: multilingual, bilingual, translate, translation, language, multilanguage,
|
|
5 |
Requires at least: 5.1
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 3.0.
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -78,6 +78,10 @@ Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
81 |
= 3.0.5 (2021-06-08) =
|
82 |
|
83 |
* Pro: fix original post not assigned to a new translation when the languages sidebar is closed
|
5 |
Requires at least: 5.1
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 3.0.6
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 3.0.6 (2021-06-22) =
|
82 |
+
|
83 |
+
* Fix a conflict with the WooCommerce cart translation and cache plugins #876
|
84 |
+
|
85 |
= 3.0.5 (2021-06-08) =
|
86 |
|
87 |
* Pro: fix original post not assigned to a new translation when the languages sidebar is closed
|