Version Description
- Use Polylang custom flags.
Download this release
Release Info
Developer | pacotole |
Plugin | Polylang Connect for Elementor – Templates Translation & Language Switcher |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.0.5
- README.txt +4 -1
- connect-polylang-elementor.php +2 -2
- includes/functions.php +2 -1
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.
|
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.4 =
|
198 |
* Added better info of template instances for translations on Theme Editor and WP admin list.
|
199 |
* Minor tweaks on Language Switcher dropdown styles.
|
5 |
Requires at least: 5.4
|
6 |
Tested up to: 5.9
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.0.5
|
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.5 =
|
198 |
+
* Use Polylang custom flags.
|
199 |
+
|
200 |
= 2.0.4 =
|
201 |
* Added better info of template instances for translations on Theme Editor and WP admin list.
|
202 |
* Minor tweaks on Language Switcher dropdown styles.
|
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.
|
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.
|
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.5
|
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.5' );
|
35 |
define( 'CPEL_FILE', __FILE__ );
|
36 |
define( 'CPEL_DIR', plugin_dir_path( CPEL_FILE ) );
|
37 |
define( 'CPEL_BASENAME', plugin_basename( CPEL_FILE ) );
|
includes/functions.php
CHANGED
@@ -90,13 +90,14 @@ function cpel_is_translation( $post_id = null ) {
|
|
90 |
* Flag code
|
91 |
*
|
92 |
* @since 2.0.0
|
|
|
93 |
*
|
94 |
* @param string $flag_url
|
95 |
* @return string|bool flag code or false
|
96 |
*/
|
97 |
function cpel_flag_code( $flag_url ) {
|
98 |
|
99 |
-
return preg_match( '/polylang
|
100 |
|
101 |
}
|
102 |
|
90 |
* Flag code
|
91 |
*
|
92 |
* @since 2.0.0
|
93 |
+
* @since 2.0.5 don't return code for custom flags
|
94 |
*
|
95 |
* @param string $flag_url
|
96 |
* @return string|bool flag code or false
|
97 |
*/
|
98 |
function cpel_flag_code( $flag_url ) {
|
99 |
|
100 |
+
return preg_match( '/polylang\/flags\/(\w+).(?:jpg|png|svg)$/i', $flag_url, $matchs ) ? $matchs[1] : false;
|
101 |
|
102 |
}
|
103 |
|