Polylang Connect for Elementor – Templates Translation & Language Switcher - Version 2.0.7

Version Description

  • Fixed deprecated message with Elementor 3.6.
  • More restricted filter for lang home urls with trailing slash.
Download this release

Release Info

Developer pacotole
Plugin Icon 128x128 Polylang Connect for Elementor – Templates Translation & Language Switcher
Version 2.0.7
Comparing to
See all releases

Code changes from version 2.0.6 to 2.0.7

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: elementor, polylang, multilingual, language switcher, languages, templates
5
  Requires at least: 5.4
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
- Stable tag: 2.0.6
9
  License: GPL-2.0-or-later
10
  License URI: https://opensource.org/licenses/GPL-2.0
11
 
@@ -194,6 +194,10 @@ There are quite a few:
194
 
195
  == Changelog ==
196
 
 
 
 
 
197
  = 2.0.6 =
198
  * Fixed Elementor Search Form url with correct language.
199
 
5
  Requires at least: 5.4
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
+ Stable tag: 2.0.7
9
  License: GPL-2.0-or-later
10
  License URI: https://opensource.org/licenses/GPL-2.0
11
 
194
 
195
  == Changelog ==
196
 
197
+ = 2.0.7 =
198
+ * Fixed deprecated message with Elementor 3.6.
199
+ * More restricted filter for lang home urls with trailing slash.
200
+
201
  = 2.0.6 =
202
  * Fixed Elementor Search Form url with correct language.
203
 
connect-polylang-elementor.php CHANGED
@@ -8,7 +8,7 @@
8
  * Plugin Name: Polylang Connect for Elementor
9
  * Plugin URI: https://github.com/creame/connect-polylang-elementor
10
  * Description: Connect Polylang with Elementor. Display templates in the correct language, language switcher widget, language visibility conditions and dynamic tags.
11
- * Version: 2.0.6
12
  * Author: Creame
13
  * Author URI: https://crea.me/
14
  * License: GPL-2.0-or-later
@@ -31,7 +31,7 @@ defined( 'ABSPATH' ) || exit;
31
  *
32
  * @since 2.0.0
33
  */
34
- define( 'CPEL_PLUGIN_VERSION', '2.0.6' );
35
  define( 'CPEL_FILE', __FILE__ );
36
  define( 'CPEL_DIR', plugin_dir_path( CPEL_FILE ) );
37
  define( 'CPEL_BASENAME', plugin_basename( CPEL_FILE ) );
8
  * Plugin Name: Polylang Connect for Elementor
9
  * Plugin URI: https://github.com/creame/connect-polylang-elementor
10
  * Description: Connect Polylang with Elementor. Display templates in the correct language, language switcher widget, language visibility conditions and dynamic tags.
11
+ * Version: 2.0.7
12
  * Author: Creame
13
  * Author URI: https://crea.me/
14
  * License: GPL-2.0-or-later
31
  *
32
  * @since 2.0.0
33
  */
34
+ define( 'CPEL_PLUGIN_VERSION', '2.0.7' );
35
  define( 'CPEL_FILE', __FILE__ );
36
  define( 'CPEL_DIR', plugin_dir_path( CPEL_FILE ) );
37
  define( 'CPEL_BASENAME', plugin_basename( CPEL_FILE ) );
includes/connect-plugins.php CHANGED
@@ -367,7 +367,6 @@ class ConnectPlugins {
367
  */
368
  function elementor_home_url_white_list( $white_list ) {
369
 
370
- $white_list[] = array( 'file' => 'search-form.php' );
371
  $white_list[] = array( 'file' => 'site-url.php' );
372
 
373
  return $white_list;
@@ -385,7 +384,8 @@ class ConnectPlugins {
385
  */
386
  function home_url_language_dir_slash( $url, $path ) {
387
 
388
- return empty( $path ) && function_exists( 'PLL' ) && 1 === PLL()->options['force_lang'] ? trailingslashit( $url ) : $url;
 
389
 
390
  }
391
 
367
  */
368
  function elementor_home_url_white_list( $white_list ) {
369
 
 
370
  $white_list[] = array( 'file' => 'site-url.php' );
371
 
372
  return $white_list;
384
  */
385
  function home_url_language_dir_slash( $url, $path ) {
386
 
387
+ return empty( $path ) && ! is_admin() && $url !== get_option( 'home' )
388
+ && function_exists( 'PLL' ) && 1 === PLL()->options['force_lang'] ? trailingslashit( $url ) : $url;
389
 
390
  }
391
 
includes/widgets/polylang-language-switcher.php CHANGED
@@ -164,7 +164,7 @@ class PolylangLanguageSwitcher extends Widget_Base {
164
  *
165
  * @uses pll_the_languages()
166
  */
167
- protected function _register_controls() {
168
 
169
  /** Content: Layout etc. */
170
  $this->start_controls_section(
164
  *
165
  * @uses pll_the_languages()
166
  */
167
+ protected function register_controls() {
168
 
169
  /** Content: Layout etc. */
170
  $this->start_controls_section(