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

Version Description

  • Don't load integrations if Polylang languages are not defined.
Download this release

Release Info

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

Code changes from version 2.0.7 to 2.0.8

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.7
9
  License: GPL-2.0-or-later
10
  License URI: https://opensource.org/licenses/GPL-2.0
11
 
@@ -194,6 +194,9 @@ There are quite a few:
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.
5
  Requires at least: 5.4
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
+ Stable tag: 2.0.8
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.8 =
198
+ * Don't load integrations if Polylang languages are not defined.
199
+
200
  = 2.0.7 =
201
  * Fixed deprecated message with Elementor 3.6.
202
  * More restricted filter for lang home urls with trailing slash.
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.7
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.7' );
35
  define( 'CPEL_FILE', __FILE__ );
36
  define( 'CPEL_DIR', plugin_dir_path( CPEL_FILE ) );
37
  define( 'CPEL_BASENAME', plugin_basename( CPEL_FILE ) );
@@ -85,7 +85,7 @@ function setup() {
85
 
86
  require CPEL_DIR . 'includes/functions.php';
87
 
88
- if ( cpel_is_polylang_active() && cpel_is_elementor_active() ) {
89
 
90
  ConnectPlugins::instance();
91
  LanguageVisibility::instance();
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.8
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.8' );
35
  define( 'CPEL_FILE', __FILE__ );
36
  define( 'CPEL_DIR', plugin_dir_path( CPEL_FILE ) );
37
  define( 'CPEL_BASENAME', plugin_basename( CPEL_FILE ) );
85
 
86
  require CPEL_DIR . 'includes/functions.php';
87
 
88
+ if ( cpel_is_polylang_api_active() && cpel_is_elementor_active() ) {
89
 
90
  ConnectPlugins::instance();
91
  LanguageVisibility::instance();
includes/functions.php CHANGED
@@ -58,15 +58,15 @@ function cpel_is_polylang_pro_active() {
58
  }
59
 
60
  /**
61
- * Is Polylang (free) plugin active or not?
62
  *
63
- * @since 1.0.0
64
  *
65
  * @return bool TRUE if plugin is active, FALSE otherwise.
66
  */
67
- function cpel_is_polylang_free_active() {
68
 
69
- return cpel_is_polylang_active() && ! cpel_is_polylang_pro_active();
70
 
71
  }
72
 
58
  }
59
 
60
  /**
61
+ * Is Polylang API active
62
  *
63
+ * @since 2.0.8
64
  *
65
  * @return bool TRUE if plugin is active, FALSE otherwise.
66
  */
67
+ function cpel_is_polylang_api_active() {
68
 
69
+ return cpel_is_polylang_active() && function_exists( 'pll_get_post' );
70
 
71
  }
72