Version Description
(2019-10-09) =
- Pro: Require ACF 5.7.11+ to activate the compatibility to avoid fatal errors with older versions
- Pro: Avoid translating empty front slug (could cause a wrong redirect to /wp-admin)
- Pro: Fix filter wp_unique_term_slug not always correctly applied.
- Pro: Fix a conflict with Divi causing post synchronization buttons to be displayed multiple times
- Avoid notice in WP CLI context
Download this release
Release Info
Developer | Chouby |
Plugin | Polylang |
Version | 2.6.5 |
Comparing to | |
See all releases |
Code changes from version 2.6.4 to 2.6.5
- admin/admin.php +7 -5
- include/functions.php +9 -0
- modules/plugins/plugins-compat.php +1 -2
- polylang.php +2 -2
- readme.txt +9 -1
admin/admin.php
CHANGED
@@ -181,14 +181,16 @@ class PLL_Admin extends PLL_Admin_Base {
|
|
181 |
*
|
182 |
* @since 2.6
|
183 |
*
|
184 |
-
* @param bool $is_block_editor Whether to use the block editor or not
|
185 |
* @return bool
|
186 |
*/
|
187 |
public function _maybe_load_sync_post( $is_block_editor ) {
|
188 |
-
if (
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
192 |
}
|
193 |
|
194 |
return $is_block_editor;
|
181 |
*
|
182 |
* @since 2.6
|
183 |
*
|
184 |
+
* @param bool $is_block_editor Whether to use the block editor or not.
|
185 |
* @return bool
|
186 |
*/
|
187 |
public function _maybe_load_sync_post( $is_block_editor ) {
|
188 |
+
if ( ! isset( $this->sync_post ) ) { // Make sure to instantiate the class only once, as the function may be called from a filter.
|
189 |
+
if ( class_exists( 'PLL_Sync_Post_REST' ) && pll_use_block_editor_plugin() && $is_block_editor ) {
|
190 |
+
$this->sync_post = new PLL_Sync_Post_REST( $this );
|
191 |
+
} elseif ( class_exists( 'PLL_Sync_Post' ) ) {
|
192 |
+
$this->sync_post = new PLL_Sync_Post( $this );
|
193 |
+
}
|
194 |
}
|
195 |
|
196 |
return $is_block_editor;
|
include/functions.php
CHANGED
@@ -145,6 +145,15 @@ function pll_get_requested_url() {
|
|
145 |
return set_url_scheme( esc_url_raw( wp_unslash( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) ) );
|
146 |
}
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
if ( WP_DEBUG ) {
|
149 |
// phpcs:ignore WordPress.PHP.DevelopmentFunctions
|
150 |
trigger_error( '$_SERVER[\'HTTP_HOST\'] or $_SERVER[\'REQUEST_URI\'] are required but not set.' );
|
145 |
return set_url_scheme( esc_url_raw( wp_unslash( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) ) );
|
146 |
}
|
147 |
|
148 |
+
/*
|
149 |
+
* In WP CLI context, few developers define superglobals in wp-config.php
|
150 |
+
* as proposed in https://make.wordpress.org/cli/handbook/common-issues/#php-notice-undefined-index-on-_server-superglobal
|
151 |
+
* So let's return the unfiltered home url to avoid a bunch of notices.
|
152 |
+
*/
|
153 |
+
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
154 |
+
return get_option( 'home' );
|
155 |
+
}
|
156 |
+
|
157 |
if ( WP_DEBUG ) {
|
158 |
// phpcs:ignore WordPress.PHP.DevelopmentFunctions
|
159 |
trigger_error( '$_SERVER[\'HTTP_HOST\'] or $_SERVER[\'REQUEST_URI\'] are required but not set.' );
|
modules/plugins/plugins-compat.php
CHANGED
@@ -133,8 +133,7 @@ class PLL_Plugins_Compat {
|
|
133 |
*/
|
134 |
public function after_setup_theme() {
|
135 |
// Advanced Custom Fields Pro
|
136 |
-
|
137 |
-
if ( class_exists( 'acf' ) && function_exists( 'acf_get_value' ) && class_exists( 'PLL_ACF' ) ) {
|
138 |
add_action( 'init', array( $this->acf = new PLL_ACF(), 'init' ) );
|
139 |
}
|
140 |
}
|
133 |
*/
|
134 |
public function after_setup_theme() {
|
135 |
// Advanced Custom Fields Pro
|
136 |
+
if ( defined( 'ACF_VERSION' ) && version_compare( ACF_VERSION, '5.7.11', '>=' ) && class_exists( 'PLL_ACF' ) ) {
|
|
|
137 |
add_action( 'init', array( $this->acf = new PLL_ACF(), 'init' ) );
|
138 |
}
|
139 |
}
|
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.5
|
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.5' );
|
55 |
define( 'PLL_MIN_WP_VERSION', '4.7' );
|
56 |
|
57 |
define( 'POLYLANG_FILE', __FILE__ ); // this file
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.2
|
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.4 (2019-08-27) =
|
80 |
|
81 |
* Pro: Fix a conflict preventing meta synchronization when ACF is active
|
4 |
Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.2
|
7 |
+
Stable tag: 2.6.5
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
Making WordPress multilingual
|
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
|
82 |
+
* Pro: Avoid translating empty front slug (could cause a wrong redirect to /wp-admin)
|
83 |
+
* Pro: Fix filter wp_unique_term_slug not always correctly applied.
|
84 |
+
* Pro: Fix a conflict with Divi causing post synchronization buttons to be displayed multiple times
|
85 |
+
* Avoid notice in WP CLI context
|
86 |
+
|
87 |
= 2.6.4 (2019-08-27) =
|
88 |
|
89 |
* Pro: Fix a conflict preventing meta synchronization when ACF is active
|