Changeset 3418158
- Timestamp:
- 12/12/2025 11:06:43 AM (3 weeks ago)
- Location:
- connect-polylang-elementor
- Files:
-
- 3 added
- 18 deleted
- 16 edited
- 25 copied
-
assets/banner-1544x500.png (modified) (previous)
-
assets/banner-772x250.png (modified) (previous)
-
assets/screenshot-1.gif (added)
-
assets/screenshot-2.gif (added)
-
assets/screenshot-3.gif (added)
-
tags/2.5.4 (copied) (copied from connect-polylang-elementor/trunk)
-
tags/2.5.4/CHANGES.md (deleted)
-
tags/2.5.4/README.txt (copied) (copied from connect-polylang-elementor/trunk/README.txt) (11 diffs)
-
tags/2.5.4/assets/css/index.php (deleted)
-
tags/2.5.4/assets/css/language-switcher.css (copied) (copied from connect-polylang-elementor/trunk/assets/css/language-switcher.css)
-
tags/2.5.4/assets/css/language-switcher.min.css (copied) (copied from connect-polylang-elementor/trunk/assets/css/language-switcher.min.css)
-
tags/2.5.4/assets/css/plsfe-editor.css (deleted)
-
tags/2.5.4/assets/css/plsfe-editor.min.css (deleted)
-
tags/2.5.4/assets/css/plsfe-frontend.css (deleted)
-
tags/2.5.4/assets/css/plsfe-frontend.min.css (deleted)
-
tags/2.5.4/assets/flags (copied) (copied from connect-polylang-elementor/trunk/assets/flags)
-
tags/2.5.4/assets/index.php (deleted)
-
tags/2.5.4/composer.json (copied) (copied from connect-polylang-elementor/trunk/composer.json)
-
tags/2.5.4/connect-polylang-elementor.php (copied) (copied from connect-polylang-elementor/trunk/connect-polylang-elementor.php) (5 diffs)
-
tags/2.5.4/includes/admin-extras.php (copied) (copied from connect-polylang-elementor/trunk/includes/admin-extras.php) (2 diffs)
-
tags/2.5.4/includes/connect-plugins.php (copied) (copied from connect-polylang-elementor/trunk/includes/connect-plugins.php) (5 diffs)
-
tags/2.5.4/includes/dynamic-tags (copied) (copied from connect-polylang-elementor/trunk/includes/dynamic-tags)
-
tags/2.5.4/includes/dynamic-tags/language-code.php (modified) (1 diff)
-
tags/2.5.4/includes/dynamic-tags/language-flag.php (copied) (copied from connect-polylang-elementor/trunk/includes/dynamic-tags/language-flag.php)
-
tags/2.5.4/includes/dynamic-tags/language-name.php (modified) (1 diff)
-
tags/2.5.4/includes/dynamic-tags/manager.php (copied) (copied from connect-polylang-elementor/trunk/includes/dynamic-tags/manager.php)
-
tags/2.5.4/includes/dynamic-tags/tag-trait.php (copied) (copied from connect-polylang-elementor/trunk/includes/dynamic-tags/tag-trait.php) (1 diff)
-
tags/2.5.4/includes/elementor-assets.php (copied) (copied from connect-polylang-elementor/trunk/includes/elementor-assets.php) (2 diffs)
-
tags/2.5.4/includes/finder (copied) (copied from connect-polylang-elementor/trunk/includes/finder)
-
tags/2.5.4/includes/finder/manager.php (copied) (copied from connect-polylang-elementor/trunk/includes/finder/manager.php)
-
tags/2.5.4/includes/finder/polylang-category.php (copied) (copied from connect-polylang-elementor/trunk/includes/finder/polylang-category.php) (1 diff)
-
tags/2.5.4/includes/functions-conditionals.php (deleted)
-
tags/2.5.4/includes/functions-global.php (deleted)
-
tags/2.5.4/includes/functions.php (copied) (copied from connect-polylang-elementor/trunk/includes/functions.php) (1 diff)
-
tags/2.5.4/includes/index.php (deleted)
-
tags/2.5.4/includes/language-visibility.php (copied) (copied from connect-polylang-elementor/trunk/includes/language-visibility.php)
-
tags/2.5.4/includes/util (copied) (copied from connect-polylang-elementor/trunk/includes/util)
-
tags/2.5.4/includes/util/emojis.php (copied) (copied from connect-polylang-elementor/trunk/includes/util/emojis.php)
-
tags/2.5.4/includes/util/info.php (deleted)
-
tags/2.5.4/includes/widgets (copied) (copied from connect-polylang-elementor/trunk/includes/widgets)
-
tags/2.5.4/includes/widgets/manager.php (copied) (copied from connect-polylang-elementor/trunk/includes/widgets/manager.php)
-
tags/2.5.4/includes/widgets/polylang-language-switcher.php (copied) (copied from connect-polylang-elementor/trunk/includes/widgets/polylang-language-switcher.php) (1 diff)
-
tags/2.5.4/index.php (deleted)
-
tags/2.5.4/languages/connect-polylang-elementor-de_DE.mo (deleted)
-
tags/2.5.4/languages/connect-polylang-elementor-de_DE.po (deleted)
-
tags/2.5.4/languages/connect-polylang-elementor-de_DE_formal.mo (deleted)
-
tags/2.5.4/languages/connect-polylang-elementor-de_DE_formal.po (deleted)
-
tags/2.5.4/languages/connect-polylang-elementor.pot (copied) (copied from connect-polylang-elementor/trunk/languages/connect-polylang-elementor.pot) (5 diffs)
-
tags/2.5.4/languages/index.php (deleted)
-
tags/2.5.4/modules (deleted)
-
trunk/README.txt (modified) (11 diffs)
-
trunk/connect-polylang-elementor.php (modified) (5 diffs)
-
trunk/includes/admin-extras.php (modified) (2 diffs)
-
trunk/includes/connect-plugins.php (modified) (5 diffs)
-
trunk/includes/dynamic-tags/language-code.php (modified) (1 diff)
-
trunk/includes/dynamic-tags/language-name.php (modified) (1 diff)
-
trunk/includes/dynamic-tags/tag-trait.php (modified) (1 diff)
-
trunk/includes/elementor-assets.php (modified) (2 diffs)
-
trunk/includes/finder/polylang-category.php (modified) (1 diff)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/includes/widgets/polylang-language-switcher.php (modified) (1 diff)
-
trunk/languages/connect-polylang-elementor.pot (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
connect-polylang-elementor/tags/2.5.4/README.txt
r3380230 r3418158 1 1 === Connect Polylang for Elementor === 2 Contributors: creapuntome, pacotole, daveshine, p4fbradjohnson2 Contributors: creapuntome, pacotole, daveshine, narinder-singh, p4fbradjohnson 3 3 Donate link: https://github.com/sponsors/creame 4 4 Tags: elementor, polylang, multilingual, language switcher, dynamic tags 5 5 Requires at least: 5.4 6 Tested up to: 6. 86 Tested up to: 6.9 7 7 Requires PHP: 5.6 8 Stable tag: 2.5. 38 Stable tag: 2.5.4 9 9 License: GPL-2.0-or-later 10 10 License URI: https://opensource.org/licenses/GPL-2.0 11 11 12 12 Connect Polylang with Elementor: translated templates, language switcher widget, language visibility conditions and more 13 14 15 13 16 14 == Description == … … 33 31 * Vertical list, Horizontal list or **styled dropdown**. 34 32 * **SVG scalable flags**. 33 34 https://www.youtube.com/watch?v=7DUh-bggJBs&feature=youtu.be 35 35 36 36 37 #### 👁️ Language Visibility Conditions … … 60 61 * Other integration fixes. 61 62 63 64 [AI-powered translation for Polylang](https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=readme&utm_campaign=get_pro&utm_content=bottom_link) — AutoPoly instantly translates your Elementor, Gutenberg, and ACF content in one click while keeping your design exactly the same. [Check it now (affiliated link)](https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=readme&utm_campaign=get_pro&utm_content=bottom_link) 65 66 62 67 ### How to use 63 68 You can manage translated templates in two ways: … … 135 140 1. Setup Polylang at first, add at least TWO languages, one of them make your default language (in Polylang) 136 141 2. Add content to your default Polylang language - if Polylang asks you to apply existing content to it, you should most likely click "ok" and proceed - it works really fine :) 137 3. After that setup an Elementor Theme Builder template - as ign it to your Polylang default language, apply conditions in Elementor138 4. Next, setup a translation template for the template of 3.) -- as ign your second Polylang language, DO NOT apply conditions in Elementor142 3. After that setup an Elementor Theme Builder template - assign it to your Polylang default language, apply conditions in Elementor 143 4. Next, setup a translation template for the template of 3.) -- assign your second Polylang language, DO NOT apply conditions in Elementor 139 144 140 145 … … 186 191 * [**Lingotek Translation**](https://wordpress.org/plugins/lingotek-translation/) - Native Polylang integration - Lingotek brings convenient cloud-based localization and translation for WordPress 187 192 * [**Elementor Datepicker Localization**](https://github.com/creame/elementor-datepicker-localization) - Allow form datetime fields in your site language 188 * [**Country Flags for Elementor**](https://wordpress.org/plugins/country-flags-for-elementor/) - Native Elementor widget 189 190 193 194 195 = How can I translate Polylang pages automatically? = 196 Use [AutoPoly ](https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=readme&utm_campaign=get_pro&utm_content=bottom_link) to auto-translate your Elementor and Gutenberg pages with AI in one click. [Check it now (affiliated link)](https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=readme&utm_campaign=get_pro&utm_content=bottom_link) 197 198 = Where do I report security bugs found in this plugin? = 199 Please report security bugs found in the source code of the undefined plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/ad44f834-19c4-470b-860f-d19657e7902a). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. 191 200 192 201 == Screenshots == 193 194 1. Language Switcher examples 195 2. Widget Visibility Conditions 196 3. Dynamic Tag example 197 4. Elementor Editor translations integration 198 5. Elementor Editor Top Bar translations integration 199 200 202 1. Add the language switcher in Elementor and customize its appearance. 203 2. Create and link translated pages directly inside Elementor. 204 3. Preview how the Polylang–Elementor language switcher looks on the frontend. 201 205 202 206 == Changelog == 207 208 = 2.5.4 = 209 * Added: Registered with Patchstack Vulnerability Disclosure Program 210 * Added: New screenshots 211 * Tweaks: Added affiliated links. 212 * Tweaks: Minor text improvements. 213 * Compatibility: Tested with WordPress 6.9, Elementor v3.33.2 and Polylang v3.7.5. 214 * Tweaks: Updated readme video and made small textual adjustments. 215 * Removed: Old screenshots and outdated links 203 216 204 217 = 2.5.3 = … … 213 226 = 2.5.0 = 214 227 * **NEW editor language switcher controls** for Elementor Editor Top Bar 3.25.0 and later (not v4). 215 Now can switch between pages & templates translations from "Page Settings" and in set ings panel, on "Languages" section.228 Now can switch between pages & templates translations from "Page Settings" and in settings panel, on "Languages" section. 216 229 This utilizes Elementor 3.25.0's updated approach to managing Page Settings Panel Controls. 217 230 (thanks to [@narinder9](https://github.com/narinder9) for the [main work](https://github.com/creame/connect-polylang-elementor/pull/21)). … … 305 318 306 319 = 2.0.3 = 307 * Updated language switcher dropdown animated & to ogle on mobile.320 * Updated language switcher dropdown animated & toggle on mobile. 308 321 * Added Elementor icon in posts list status. 309 322 * Fixed language switcher underline style. … … 324 337 * New dynamic tags for language name, language code, language flag (icon or svg scalable) and language url. 325 338 * Better Polylang/Elementor integration: 326 * Automatically generate display conditio s on new template translation.339 * Automatically generate display conditions on new template translation. 327 340 * Automatically generate CSS file on new template translation. 328 * Update display conditio s un change template language.341 * Update display conditions un change template language. 329 342 * Fix home and search links to point to the current language. 330 343 * Hide langue on wp-admin for global widgets. … … 354 367 = 1.0.1 - 2020-06-17 = 355 368 * Stability update for edge cases were experiencing fatal errors 356 * Thanks to sebastienserre for correct fatal unknow pll_the_languages();369 * Thanks to @sebastienserre for correct fatal unknow pll_the_languages(); 357 370 358 371 = 1.0.0 - 2018-11-28 = … … 379 392 * *Second alpha version* 380 393 * New: Added Elementor Finder integration for Polylang plugin links and resources 381 * New: Make plugin translat eable - added German translations394 * New: Make plugin translatable - added German translations 382 395 * New: Added Readme file, plus `composer.json` 383 396 * New: First public alpha release on GitHub … … 389 402 390 403 391 392 404 == Upgrade Notice == 393 405 394 406 = 2.0.4 = 395 **Warning** breaking changes with v1. Language Switcher and Dynamic Tags has been renamed and nee ed to re-added again in your templates.407 **Warning** breaking changes with v1. Language Switcher and Dynamic Tags has been renamed and need to re-added again in your templates. 396 408 397 409 = 1.0.2 = -
connect-polylang-elementor/tags/2.5.4/connect-polylang-elementor.php
r3380230 r3418158 11 11 * Plugin URI: https://github.com/creame/connect-polylang-elementor 12 12 * Description: Connect Polylang with Elementor. Display templates in the correct language, language switcher widget, language visibility conditions and dynamic tags. 13 * Version: 2.5. 313 * Version: 2.5.4 14 14 * Author: Creame 15 15 * Author URI: https://crea.me/ … … 20 20 * Requires WP: 5.4 21 21 * Requires PHP: 5.6 22 * Elementor tested up to: 3.30.2 23 * Elementor Pro tested up to: 3.30.0 22 * Requires Plugins: polylang, elementor 23 * Elementor tested up to: 3.33.2 24 * Elementor Pro tested up to: 3.33.2 24 25 * 25 26 * Copyright (c) 2021 Paco Toledo - CREAME … … 37 38 * @since 2.0.0 38 39 */ 39 define( 'CPEL_PLUGIN_VERSION', '2.5. 3' );40 define( 'CPEL_PLUGIN_VERSION', '2.5.4' ); 40 41 define( 'CPEL_FILE', __FILE__ ); 41 42 define( 'CPEL_DIR', plugin_dir_path( CPEL_FILE ) ); … … 153 154 if ( isset( $pll_options['force_lang'] ) && 3 === $pll_options['force_lang'] && ! empty( $pll_options['domains'] ) ) { 154 155 155 $srv_host = wp_parse_url( "//{$_SERVER['HTTP_HOST']}", PHP_URL_HOST );156 $srv_host = wp_parse_url( '//' . sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ), PHP_URL_HOST ); 156 157 $url_host = wp_parse_url( $url, PHP_URL_HOST ); 157 158 158 159 if ( $url_host ) { 159 160 foreach ( $pll_options['domains'] as $domain ) { 160 if ( false !== strpos( $domain, $srv_host ) ) { 161 $domain_host = wp_parse_url( $domain, PHP_URL_HOST ); 162 if ( $domain_host === $srv_host ) { 161 163 $url = str_replace( $url_host, $srv_host, $url ); 162 164 break; … … 181 183 function fix_elementor_editor_context( $class ) { 182 184 183 return 'PLL_Frontend' === $class && is_admin() && isset( $_GET['action'] ) && 'elementor' === $_GET['action']? 'PLL_Admin' : $class;185 return 'PLL_Frontend' === $class && is_admin() && isset( $_GET['action'] ) && 'elementor' === sanitize_key( wp_unslash( $_GET['action'] ) ) ? 'PLL_Admin' : $class; 184 186 185 187 } -
connect-polylang-elementor/tags/2.5.4/includes/admin-extras.php
r2776211 r3418158 73 73 } 74 74 75 /** Display plugin settings links */ 76 return apply_filters( 77 'cpel/filter/plugins_page/settings_links', 78 $cpel_links, 79 $link_polylang, // additional param. 80 $link_elementor // additional param. 81 ); 75 // Output the links. 76 return apply_filters( 'cpel/filter/plugins_page/settings_links', $cpel_links ); 82 77 83 78 } … … 96 91 if ( CPEL_BASENAME === $cpel_file ) { 97 92 98 $cpel_links[] = '<a href="https://paypal.me/pacotole" title="Support this plugin\'s development">Donate</a>'; 99 $cpel_links[] = '<a href="mailto:[email protected]" title="Request personal one on one training on using Polylang + Elementor">Personal one-on-one training</a>'; 93 $cpel_links[] = sprintf( 94 '<a href="%1$s" title="%2$s" target="_blank" rel="noopener noreferrer">%3$s <small><b>(%4$s)</b></small></a>', 95 esc_url( 'https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=inside&utm_campaign=get_pro&utm_content=plugins_list' ), 96 esc_html__( 'AI Translation For Polylang', 'connect-polylang-elementor' ), 97 esc_html__( 'AI Translation', 'connect-polylang-elementor' ), 98 esc_html__( 'Affiliated', 'connect-polylang-elementor' ), 99 ); 100 100 101 101 } -
connect-polylang-elementor/tags/2.5.4/includes/connect-plugins.php
r3367616 r3418158 230 230 } 231 231 232 // Translate post_id. 233 $attr['id'] = pll_get_post( absint( $attr['id'] ) ) ?: $attr['id']; //phpcs:ignore WordPress.PHP.DisallowShortTernary 232 // Translate post_id safely. 233 if ( isset( $attr['id'] ) && '' !== $attr['id'] ) { 234 $id = absint( $attr['id'] ); 235 if ( $id ) { 236 $attr['id'] = pll_get_post( $id ) ?: $id; //phpcs:ignore WordPress.PHP.DisallowShortTernary 237 } 238 } 234 239 // Skip next call. 235 240 $attr['skip'] = 1; … … 237 242 $output = ''; 238 243 foreach ( $attr as $key => $val ) { 239 $output .= " $key=\"$val\"";244 $output .= ' ' . esc_attr( sanitize_key( $key ) ) . '="' . esc_attr( $val ) . '"'; 240 245 } 241 246 … … 299 304 300 305 $translation = null; 301 302 306 // Is API REST '/wp-json/elementor/v1/globals'. 303 307 if ( defined( 'REST_REQUEST' ) && REST_REQUEST && isset( $_SERVER['HTTP_REFERER'] ) ) { 304 308 // Referrer is Elementor Editor? 305 wp_parse_str( wp_parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_QUERY ), $query ); 309 $referer = esc_url_raw( $_SERVER['HTTP_REFERER'] ); 310 wp_parse_str( wp_parse_url( $referer, PHP_URL_QUERY ), $query ); 306 311 307 312 if ( isset( $query['action'], $query['post'] ) && 'elementor' === $query['action'] ) { 308 $translation = pll_get_post( $value, pll_get_post_language( intval( $query['post'] ) ) );313 $translation = pll_get_post( $value, pll_get_post_language( absint( $query['post'] ) ) ); 309 314 } 310 315 } elseif ( cpel_is_elementor_editor() ) { 311 312 $translation = pll_get_post( $value, pll_get_post_language( intval( $_GET['post'] ) ) );316 $post_id = isset( $_GET['post'] ) ? absint( $_GET['post'] ) : 0; 317 $translation = $post_id ? pll_get_post( $value, pll_get_post_language( $post_id ) ) : null; 313 318 314 319 } elseif ( ! is_admin() ) { … … 501 506 502 507 return '_elementor_css' === $meta_key && 'post-new.php' === $pagenow 503 && isset( $_GET['from_post'], $_GET['new_lang'] ) ? false : $null; 508 && isset( $_GET['from_post'], $_GET['new_lang'] ) 509 && ! empty( absint( wp_unslash( $_GET['from_post'] ) ) ) 510 && ! empty( sanitize_key( wp_unslash( $_GET['new_lang'] ) ) ) ? false : $null; 504 511 505 512 } … … 809 816 private function fix_url_domain( $url, $post_id ) { 810 817 811 $current_host = wp_parse_url( pll_current_language( 'home_url' ) ?: trailingslashit( "//{$_SERVER['HTTP_HOST']}"), PHP_URL_HOST ); //phpcs:ignore WordPress.PHP.DisallowShortTernary818 $current_host = wp_parse_url( pll_current_language( 'home_url' ) ?: trailingslashit( '//' . sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) ), PHP_URL_HOST ); //phpcs:ignore WordPress.PHP.DisallowShortTernary 812 819 $post_host = wp_parse_url( pll_get_post_language( $post_id, 'home_url' ), PHP_URL_HOST ); 813 820 -
connect-polylang-elementor/tags/2.5.4/includes/dynamic-tags/language-code.php
r2670040 r3418158 25 25 26 26 public function render() { 27 echo wp_kses_post( $this->get_language_field( 'slug' ) );27 echo esc_html( $this->get_language_field( 'slug' ) ); 28 28 } 29 29 -
connect-polylang-elementor/tags/2.5.4/includes/dynamic-tags/language-name.php
r2670040 r3418158 25 25 26 26 public function render() { 27 echo wp_kses_post( $this->get_language_field( 'name' ) );27 echo esc_html( $this->get_language_field( 'name' ) ); 28 28 } 29 29 -
connect-polylang-elementor/tags/2.5.4/includes/dynamic-tags/tag-trait.php
r2885561 r3418158 39 39 40 40 $languages = pll_the_languages( array( 'raw' => 1 ) ); 41 42 41 if ( is_array( $languages ) ) { 43 42 if ( 'current' === $language ) { 44 $value = $languages[ pll_current_language() ][ $field ]; 45 } elseif ( isset( $languages[ $language ] ) ) { 43 $current_lang = pll_current_language(); 44 // If no current language, fallback to default language 45 if ( ! $current_lang ) { 46 $current_lang = pll_default_language(); 47 } 48 if ( $current_lang && isset( $languages[ $current_lang ] ) && isset( $languages[ $current_lang ][ $field ] ) ) { 49 $value = $languages[ $current_lang ][ $field ]; 50 } 51 } elseif ( isset( $languages[ $language ] ) && isset( $languages[ $language ][ $field ] ) ) { 46 52 $value = $languages[ $language ][ $field ]; 47 53 } -
connect-polylang-elementor/tags/2.5.4/includes/elementor-assets.php
r2922994 r3418158 50 50 } 51 51 52 $is_preview = isset( $_GET['elementor_preview']);52 $is_preview = ! empty( sanitize_key( wp_unslash( $_GET['elementor_preview'] ) ) ); 53 53 54 54 if ( ! cpel_is_elementor_editor() && ! $is_preview ) { … … 179 179 } 180 180 181 $current_url = add_query_arg( $_SERVER['QUERY_STRING'], '', admin_url( 'post.php' ) );182 $server_host = wp_parse_url( "//{$_SERVER['HTTP_HOST']}", PHP_URL_HOST );183 $post_host = wp_parse_url( \pll_get_post_language( intval( $_GET['post'] ), 'home_url' ), PHP_URL_HOST );181 $current_url = add_query_arg( wp_unslash( $_SERVER['QUERY_STRING'] ), '', admin_url( 'post.php' ) ); 182 $server_host = wp_parse_url( '//' . sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ), PHP_URL_HOST ); 183 $post_host = wp_parse_url( \pll_get_post_language( absint( $_GET['post'] ), 'home_url' ), PHP_URL_HOST ); 184 184 185 185 if ( null !== $post_host && $server_host !== $post_host ) { -
connect-polylang-elementor/tags/2.5.4/includes/finder/polylang-category.php
r2922994 r3418158 108 108 array( 109 109 'name' => 'settings', 110 'url' => esc_url_raw( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $lang_data->term_id) ),110 'url' => esc_url_raw( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . absint( $lang_data->term_id ) ) ), 111 111 'icon' => 'settings', 112 112 ), -
connect-polylang-elementor/tags/2.5.4/includes/functions.php
r2885561 r3418158 93 93 function cpel_is_elementor_editor() { 94 94 95 return is_admin() && isset( $_GET['action'], $_GET['post'] ) && 'elementor' === $_GET['action']; 95 return is_admin() 96 && isset( $_GET['action'], $_GET['post'] ) 97 && 'elementor' === sanitize_key( wp_unslash( $_GET['action'] ) ) 98 && absint( $_GET['post'] ) > 0; 96 99 97 100 } -
connect-polylang-elementor/tags/2.5.4/includes/widgets/polylang-language-switcher.php
r3368585 r3418158 731 731 // Max number of items in language dropdown 732 732 if ( 'dropdown' === $settings['layout'] ) { 733 $this->add_render_attribute( '_wrapper', 'style', '--langs:' . ( count( $languages ) - 1) );733 $this->add_render_attribute( '_wrapper', 'style', '--langs:' . ( absint( count( $languages ) - 1 ) ) ); 734 734 } 735 735 -
connect-polylang-elementor/tags/2.5.4/languages/connect-polylang-elementor.pot
r2932719 r3418158 1 # Copyright (C) 202 3Creame1 # Copyright (C) 2025 Creame 2 2 # This file is distributed under the GPL-2.0-or-later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Connect Polylang for Elementor 2. 4.3\n"5 "Project-Id-Version: Connect Polylang for Elementor 2.5.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/connect-polylang-elementor\n" 7 7 "Last-Translator: Pacotole <[email protected]>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-06-07T16:17:27+00:00\n"12 "POT-Creation-Date: 2025-12-12T10:59:13+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 7.1\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: connect-polylang-elementor\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: connect-polylang-elementor.php 18 19 msgid "Connect Polylang for Elementor" 19 20 msgstr "" 20 21 21 22 #. Plugin URI of the plugin 23 #: connect-polylang-elementor.php 22 24 msgid "https://github.com/creame/connect-polylang-elementor" 23 25 msgstr "" 24 26 25 27 #. Description of the plugin 28 #: connect-polylang-elementor.php 26 29 msgid "Connect Polylang with Elementor. Display templates in the correct language, language switcher widget, language visibility conditions and dynamic tags." 27 30 msgstr "" 28 31 29 32 #. Author of the plugin 33 #: connect-polylang-elementor.php 30 34 msgid "Creame" 31 35 msgstr "" 32 36 33 37 #. Author URI of the plugin 38 #: connect-polylang-elementor.php 34 39 msgid "https://crea.me/" 35 40 msgstr "" … … 55 60 msgstr "" 56 61 57 #: includes/connect-plugins.php:636 62 #: includes/admin-extras.php:96 63 msgid "AI Translation For Polylang" 64 msgstr "" 65 66 #: includes/admin-extras.php:97 67 msgid "AI Translation" 68 msgstr "" 69 70 #: includes/admin-extras.php:98 71 msgid "Affiliated" 72 msgstr "" 73 74 #: includes/connect-plugins.php:694 75 #: includes/connect-plugins.php:953 76 #, php-format 58 77 msgid "Add a translation — %s" 59 78 msgstr "" 60 79 61 #: includes/connect-plugins.php:743 80 #: includes/connect-plugins.php:801 81 #, php-format 62 82 msgid "(from %s)" 83 msgstr "" 84 85 #: includes/connect-plugins.php:954 86 #, php-format 87 msgid "Add a translation in %s" 63 88 msgstr "" 64 89 … … 79 104 80 105 #: includes/dynamic-tags/language-flag.php:46 81 #: includes/widgets/polylang-language-switcher.php:5 52106 #: includes/widgets/polylang-language-switcher.php:548 82 107 msgid "Scalable Image" 83 108 msgstr "" … … 139 164 msgstr "" 140 165 141 #: includes/language-visibility.php:6 6166 #: includes/language-visibility.php:68 142 167 msgid "Language Visibility" 143 168 msgstr "" 144 169 145 #: includes/language-visibility.php:10 6170 #: includes/language-visibility.php:108 146 171 msgid "When language is:" 147 172 msgstr "" 148 173 149 #: includes/widgets/polylang-language-switcher.php:10 8174 #: includes/widgets/polylang-language-switcher.php:104 150 175 msgctxt "Comma separated keywords" 151 176 msgid "languages, switcher, polylang, multilingual, flags, countries, country" 152 177 msgstr "" 153 178 154 #: includes/widgets/polylang-language-switcher.php:1 83155 #: includes/widgets/polylang-language-switcher.php:45 4179 #: includes/widgets/polylang-language-switcher.php:179 180 #: includes/widgets/polylang-language-switcher.php:450 156 181 msgid "Dropdown" 157 182 msgstr "" 158 183 159 #: includes/widgets/polylang-language-switcher.php:2 62184 #: includes/widgets/polylang-language-switcher.php:258 160 185 msgid "Displays language codes" 161 186 msgstr "" 162 187 163 #: includes/widgets/polylang-language-switcher.php:27 5188 #: includes/widgets/polylang-language-switcher.php:271 164 189 msgid "Main Menu" 165 190 msgstr "" 166 191 167 #: includes/widgets/polylang-language-switcher.php: 403192 #: includes/widgets/polylang-language-switcher.php:399 168 193 msgid "Horizontal Padding" 169 194 msgstr "" 170 195 171 #: includes/widgets/polylang-language-switcher.php:41 8196 #: includes/widgets/polylang-language-switcher.php:414 172 197 msgid "Vertical Padding" 173 198 msgstr "" 174 199 200 #: includes/widgets/polylang-language-switcher.php:459 201 msgid "Drop" 202 msgstr "" 203 204 #: includes/widgets/polylang-language-switcher.php:462 205 msgid "On Click" 206 msgstr "" 207 175 208 #: includes/widgets/polylang-language-switcher.php:463 176 msgid "Drop"177 msgstr ""178 179 #: includes/widgets/polylang-language-switcher.php:466180 msgid "On Click"181 msgstr ""182 183 #: includes/widgets/polylang-language-switcher.php:467184 209 msgid "On Mouse Hover" 185 210 msgstr "" 186 211 187 #: includes/widgets/polylang-language-switcher.php:47 7212 #: includes/widgets/polylang-language-switcher.php:473 188 213 msgid "Drop Direction" 189 214 msgstr "" 190 215 191 #: includes/widgets/polylang-language-switcher.php:61 5216 #: includes/widgets/polylang-language-switcher.php:611 192 217 msgid "Language Name" 193 218 msgstr "" 194 219 195 #: includes/widgets/polylang-language-switcher.php:64 5220 #: includes/widgets/polylang-language-switcher.php:641 196 221 msgid "Language Code" 197 222 msgstr "" -
connect-polylang-elementor/trunk/README.txt
r3380230 r3418158 1 1 === Connect Polylang for Elementor === 2 Contributors: creapuntome, pacotole, daveshine, p4fbradjohnson2 Contributors: creapuntome, pacotole, daveshine, narinder-singh, p4fbradjohnson 3 3 Donate link: https://github.com/sponsors/creame 4 4 Tags: elementor, polylang, multilingual, language switcher, dynamic tags 5 5 Requires at least: 5.4 6 Tested up to: 6. 86 Tested up to: 6.9 7 7 Requires PHP: 5.6 8 Stable tag: 2.5. 38 Stable tag: 2.5.4 9 9 License: GPL-2.0-or-later 10 10 License URI: https://opensource.org/licenses/GPL-2.0 11 11 12 12 Connect Polylang with Elementor: translated templates, language switcher widget, language visibility conditions and more 13 14 15 13 16 14 == Description == … … 33 31 * Vertical list, Horizontal list or **styled dropdown**. 34 32 * **SVG scalable flags**. 33 34 https://www.youtube.com/watch?v=7DUh-bggJBs&feature=youtu.be 35 35 36 36 37 #### 👁️ Language Visibility Conditions … … 60 61 * Other integration fixes. 61 62 63 64 [AI-powered translation for Polylang](https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=readme&utm_campaign=get_pro&utm_content=bottom_link) — AutoPoly instantly translates your Elementor, Gutenberg, and ACF content in one click while keeping your design exactly the same. [Check it now (affiliated link)](https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=readme&utm_campaign=get_pro&utm_content=bottom_link) 65 66 62 67 ### How to use 63 68 You can manage translated templates in two ways: … … 135 140 1. Setup Polylang at first, add at least TWO languages, one of them make your default language (in Polylang) 136 141 2. Add content to your default Polylang language - if Polylang asks you to apply existing content to it, you should most likely click "ok" and proceed - it works really fine :) 137 3. After that setup an Elementor Theme Builder template - as ign it to your Polylang default language, apply conditions in Elementor138 4. Next, setup a translation template for the template of 3.) -- as ign your second Polylang language, DO NOT apply conditions in Elementor142 3. After that setup an Elementor Theme Builder template - assign it to your Polylang default language, apply conditions in Elementor 143 4. Next, setup a translation template for the template of 3.) -- assign your second Polylang language, DO NOT apply conditions in Elementor 139 144 140 145 … … 186 191 * [**Lingotek Translation**](https://wordpress.org/plugins/lingotek-translation/) - Native Polylang integration - Lingotek brings convenient cloud-based localization and translation for WordPress 187 192 * [**Elementor Datepicker Localization**](https://github.com/creame/elementor-datepicker-localization) - Allow form datetime fields in your site language 188 * [**Country Flags for Elementor**](https://wordpress.org/plugins/country-flags-for-elementor/) - Native Elementor widget 189 190 193 194 195 = How can I translate Polylang pages automatically? = 196 Use [AutoPoly ](https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=readme&utm_campaign=get_pro&utm_content=bottom_link) to auto-translate your Elementor and Gutenberg pages with AI in one click. [Check it now (affiliated link)](https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=readme&utm_campaign=get_pro&utm_content=bottom_link) 197 198 = Where do I report security bugs found in this plugin? = 199 Please report security bugs found in the source code of the undefined plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/ad44f834-19c4-470b-860f-d19657e7902a). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. 191 200 192 201 == Screenshots == 193 194 1. Language Switcher examples 195 2. Widget Visibility Conditions 196 3. Dynamic Tag example 197 4. Elementor Editor translations integration 198 5. Elementor Editor Top Bar translations integration 199 200 202 1. Add the language switcher in Elementor and customize its appearance. 203 2. Create and link translated pages directly inside Elementor. 204 3. Preview how the Polylang–Elementor language switcher looks on the frontend. 201 205 202 206 == Changelog == 207 208 = 2.5.4 = 209 * Added: Registered with Patchstack Vulnerability Disclosure Program 210 * Added: New screenshots 211 * Tweaks: Added affiliated links. 212 * Tweaks: Minor text improvements. 213 * Compatibility: Tested with WordPress 6.9, Elementor v3.33.2 and Polylang v3.7.5. 214 * Tweaks: Updated readme video and made small textual adjustments. 215 * Removed: Old screenshots and outdated links 203 216 204 217 = 2.5.3 = … … 213 226 = 2.5.0 = 214 227 * **NEW editor language switcher controls** for Elementor Editor Top Bar 3.25.0 and later (not v4). 215 Now can switch between pages & templates translations from "Page Settings" and in set ings panel, on "Languages" section.228 Now can switch between pages & templates translations from "Page Settings" and in settings panel, on "Languages" section. 216 229 This utilizes Elementor 3.25.0's updated approach to managing Page Settings Panel Controls. 217 230 (thanks to [@narinder9](https://github.com/narinder9) for the [main work](https://github.com/creame/connect-polylang-elementor/pull/21)). … … 305 318 306 319 = 2.0.3 = 307 * Updated language switcher dropdown animated & to ogle on mobile.320 * Updated language switcher dropdown animated & toggle on mobile. 308 321 * Added Elementor icon in posts list status. 309 322 * Fixed language switcher underline style. … … 324 337 * New dynamic tags for language name, language code, language flag (icon or svg scalable) and language url. 325 338 * Better Polylang/Elementor integration: 326 * Automatically generate display conditio s on new template translation.339 * Automatically generate display conditions on new template translation. 327 340 * Automatically generate CSS file on new template translation. 328 * Update display conditio s un change template language.341 * Update display conditions un change template language. 329 342 * Fix home and search links to point to the current language. 330 343 * Hide langue on wp-admin for global widgets. … … 354 367 = 1.0.1 - 2020-06-17 = 355 368 * Stability update for edge cases were experiencing fatal errors 356 * Thanks to sebastienserre for correct fatal unknow pll_the_languages();369 * Thanks to @sebastienserre for correct fatal unknow pll_the_languages(); 357 370 358 371 = 1.0.0 - 2018-11-28 = … … 379 392 * *Second alpha version* 380 393 * New: Added Elementor Finder integration for Polylang plugin links and resources 381 * New: Make plugin translat eable - added German translations394 * New: Make plugin translatable - added German translations 382 395 * New: Added Readme file, plus `composer.json` 383 396 * New: First public alpha release on GitHub … … 389 402 390 403 391 392 404 == Upgrade Notice == 393 405 394 406 = 2.0.4 = 395 **Warning** breaking changes with v1. Language Switcher and Dynamic Tags has been renamed and nee ed to re-added again in your templates.407 **Warning** breaking changes with v1. Language Switcher and Dynamic Tags has been renamed and need to re-added again in your templates. 396 408 397 409 = 1.0.2 = -
connect-polylang-elementor/trunk/connect-polylang-elementor.php
r3380230 r3418158 11 11 * Plugin URI: https://github.com/creame/connect-polylang-elementor 12 12 * Description: Connect Polylang with Elementor. Display templates in the correct language, language switcher widget, language visibility conditions and dynamic tags. 13 * Version: 2.5. 313 * Version: 2.5.4 14 14 * Author: Creame 15 15 * Author URI: https://crea.me/ … … 20 20 * Requires WP: 5.4 21 21 * Requires PHP: 5.6 22 * Elementor tested up to: 3.30.2 23 * Elementor Pro tested up to: 3.30.0 22 * Requires Plugins: polylang, elementor 23 * Elementor tested up to: 3.33.2 24 * Elementor Pro tested up to: 3.33.2 24 25 * 25 26 * Copyright (c) 2021 Paco Toledo - CREAME … … 37 38 * @since 2.0.0 38 39 */ 39 define( 'CPEL_PLUGIN_VERSION', '2.5. 3' );40 define( 'CPEL_PLUGIN_VERSION', '2.5.4' ); 40 41 define( 'CPEL_FILE', __FILE__ ); 41 42 define( 'CPEL_DIR', plugin_dir_path( CPEL_FILE ) ); … … 153 154 if ( isset( $pll_options['force_lang'] ) && 3 === $pll_options['force_lang'] && ! empty( $pll_options['domains'] ) ) { 154 155 155 $srv_host = wp_parse_url( "//{$_SERVER['HTTP_HOST']}", PHP_URL_HOST );156 $srv_host = wp_parse_url( '//' . sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ), PHP_URL_HOST ); 156 157 $url_host = wp_parse_url( $url, PHP_URL_HOST ); 157 158 158 159 if ( $url_host ) { 159 160 foreach ( $pll_options['domains'] as $domain ) { 160 if ( false !== strpos( $domain, $srv_host ) ) { 161 $domain_host = wp_parse_url( $domain, PHP_URL_HOST ); 162 if ( $domain_host === $srv_host ) { 161 163 $url = str_replace( $url_host, $srv_host, $url ); 162 164 break; … … 181 183 function fix_elementor_editor_context( $class ) { 182 184 183 return 'PLL_Frontend' === $class && is_admin() && isset( $_GET['action'] ) && 'elementor' === $_GET['action']? 'PLL_Admin' : $class;185 return 'PLL_Frontend' === $class && is_admin() && isset( $_GET['action'] ) && 'elementor' === sanitize_key( wp_unslash( $_GET['action'] ) ) ? 'PLL_Admin' : $class; 184 186 185 187 } -
connect-polylang-elementor/trunk/includes/admin-extras.php
r2776211 r3418158 73 73 } 74 74 75 /** Display plugin settings links */ 76 return apply_filters( 77 'cpel/filter/plugins_page/settings_links', 78 $cpel_links, 79 $link_polylang, // additional param. 80 $link_elementor // additional param. 81 ); 75 // Output the links. 76 return apply_filters( 'cpel/filter/plugins_page/settings_links', $cpel_links ); 82 77 83 78 } … … 96 91 if ( CPEL_BASENAME === $cpel_file ) { 97 92 98 $cpel_links[] = '<a href="https://paypal.me/pacotole" title="Support this plugin\'s development">Donate</a>'; 99 $cpel_links[] = '<a href="mailto:[email protected]" title="Request personal one on one training on using Polylang + Elementor">Personal one-on-one training</a>'; 93 $cpel_links[] = sprintf( 94 '<a href="%1$s" title="%2$s" target="_blank" rel="noopener noreferrer">%3$s <small><b>(%4$s)</b></small></a>', 95 esc_url( 'https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=inside&utm_campaign=get_pro&utm_content=plugins_list' ), 96 esc_html__( 'AI Translation For Polylang', 'connect-polylang-elementor' ), 97 esc_html__( 'AI Translation', 'connect-polylang-elementor' ), 98 esc_html__( 'Affiliated', 'connect-polylang-elementor' ), 99 ); 100 100 101 101 } -
connect-polylang-elementor/trunk/includes/connect-plugins.php
r3367616 r3418158 230 230 } 231 231 232 // Translate post_id. 233 $attr['id'] = pll_get_post( absint( $attr['id'] ) ) ?: $attr['id']; //phpcs:ignore WordPress.PHP.DisallowShortTernary 232 // Translate post_id safely. 233 if ( isset( $attr['id'] ) && '' !== $attr['id'] ) { 234 $id = absint( $attr['id'] ); 235 if ( $id ) { 236 $attr['id'] = pll_get_post( $id ) ?: $id; //phpcs:ignore WordPress.PHP.DisallowShortTernary 237 } 238 } 234 239 // Skip next call. 235 240 $attr['skip'] = 1; … … 237 242 $output = ''; 238 243 foreach ( $attr as $key => $val ) { 239 $output .= " $key=\"$val\"";244 $output .= ' ' . esc_attr( sanitize_key( $key ) ) . '="' . esc_attr( $val ) . '"'; 240 245 } 241 246 … … 299 304 300 305 $translation = null; 301 302 306 // Is API REST '/wp-json/elementor/v1/globals'. 303 307 if ( defined( 'REST_REQUEST' ) && REST_REQUEST && isset( $_SERVER['HTTP_REFERER'] ) ) { 304 308 // Referrer is Elementor Editor? 305 wp_parse_str( wp_parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_QUERY ), $query ); 309 $referer = esc_url_raw( $_SERVER['HTTP_REFERER'] ); 310 wp_parse_str( wp_parse_url( $referer, PHP_URL_QUERY ), $query ); 306 311 307 312 if ( isset( $query['action'], $query['post'] ) && 'elementor' === $query['action'] ) { 308 $translation = pll_get_post( $value, pll_get_post_language( intval( $query['post'] ) ) );313 $translation = pll_get_post( $value, pll_get_post_language( absint( $query['post'] ) ) ); 309 314 } 310 315 } elseif ( cpel_is_elementor_editor() ) { 311 312 $translation = pll_get_post( $value, pll_get_post_language( intval( $_GET['post'] ) ) );316 $post_id = isset( $_GET['post'] ) ? absint( $_GET['post'] ) : 0; 317 $translation = $post_id ? pll_get_post( $value, pll_get_post_language( $post_id ) ) : null; 313 318 314 319 } elseif ( ! is_admin() ) { … … 501 506 502 507 return '_elementor_css' === $meta_key && 'post-new.php' === $pagenow 503 && isset( $_GET['from_post'], $_GET['new_lang'] ) ? false : $null; 508 && isset( $_GET['from_post'], $_GET['new_lang'] ) 509 && ! empty( absint( wp_unslash( $_GET['from_post'] ) ) ) 510 && ! empty( sanitize_key( wp_unslash( $_GET['new_lang'] ) ) ) ? false : $null; 504 511 505 512 } … … 809 816 private function fix_url_domain( $url, $post_id ) { 810 817 811 $current_host = wp_parse_url( pll_current_language( 'home_url' ) ?: trailingslashit( "//{$_SERVER['HTTP_HOST']}"), PHP_URL_HOST ); //phpcs:ignore WordPress.PHP.DisallowShortTernary818 $current_host = wp_parse_url( pll_current_language( 'home_url' ) ?: trailingslashit( '//' . sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) ), PHP_URL_HOST ); //phpcs:ignore WordPress.PHP.DisallowShortTernary 812 819 $post_host = wp_parse_url( pll_get_post_language( $post_id, 'home_url' ), PHP_URL_HOST ); 813 820 -
connect-polylang-elementor/trunk/includes/dynamic-tags/language-code.php
r2670040 r3418158 25 25 26 26 public function render() { 27 echo wp_kses_post( $this->get_language_field( 'slug' ) );27 echo esc_html( $this->get_language_field( 'slug' ) ); 28 28 } 29 29 -
connect-polylang-elementor/trunk/includes/dynamic-tags/language-name.php
r2670040 r3418158 25 25 26 26 public function render() { 27 echo wp_kses_post( $this->get_language_field( 'name' ) );27 echo esc_html( $this->get_language_field( 'name' ) ); 28 28 } 29 29 -
connect-polylang-elementor/trunk/includes/dynamic-tags/tag-trait.php
r2885561 r3418158 39 39 40 40 $languages = pll_the_languages( array( 'raw' => 1 ) ); 41 42 41 if ( is_array( $languages ) ) { 43 42 if ( 'current' === $language ) { 44 $value = $languages[ pll_current_language() ][ $field ]; 45 } elseif ( isset( $languages[ $language ] ) ) { 43 $current_lang = pll_current_language(); 44 // If no current language, fallback to default language 45 if ( ! $current_lang ) { 46 $current_lang = pll_default_language(); 47 } 48 if ( $current_lang && isset( $languages[ $current_lang ] ) && isset( $languages[ $current_lang ][ $field ] ) ) { 49 $value = $languages[ $current_lang ][ $field ]; 50 } 51 } elseif ( isset( $languages[ $language ] ) && isset( $languages[ $language ][ $field ] ) ) { 46 52 $value = $languages[ $language ][ $field ]; 47 53 } -
connect-polylang-elementor/trunk/includes/elementor-assets.php
r2922994 r3418158 50 50 } 51 51 52 $is_preview = isset( $_GET['elementor_preview']);52 $is_preview = ! empty( sanitize_key( wp_unslash( $_GET['elementor_preview'] ) ) ); 53 53 54 54 if ( ! cpel_is_elementor_editor() && ! $is_preview ) { … … 179 179 } 180 180 181 $current_url = add_query_arg( $_SERVER['QUERY_STRING'], '', admin_url( 'post.php' ) );182 $server_host = wp_parse_url( "//{$_SERVER['HTTP_HOST']}", PHP_URL_HOST );183 $post_host = wp_parse_url( \pll_get_post_language( intval( $_GET['post'] ), 'home_url' ), PHP_URL_HOST );181 $current_url = add_query_arg( wp_unslash( $_SERVER['QUERY_STRING'] ), '', admin_url( 'post.php' ) ); 182 $server_host = wp_parse_url( '//' . sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ), PHP_URL_HOST ); 183 $post_host = wp_parse_url( \pll_get_post_language( absint( $_GET['post'] ), 'home_url' ), PHP_URL_HOST ); 184 184 185 185 if ( null !== $post_host && $server_host !== $post_host ) { -
connect-polylang-elementor/trunk/includes/finder/polylang-category.php
r2922994 r3418158 108 108 array( 109 109 'name' => 'settings', 110 'url' => esc_url_raw( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $lang_data->term_id) ),110 'url' => esc_url_raw( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . absint( $lang_data->term_id ) ) ), 111 111 'icon' => 'settings', 112 112 ), -
connect-polylang-elementor/trunk/includes/functions.php
r2885561 r3418158 93 93 function cpel_is_elementor_editor() { 94 94 95 return is_admin() && isset( $_GET['action'], $_GET['post'] ) && 'elementor' === $_GET['action']; 95 return is_admin() 96 && isset( $_GET['action'], $_GET['post'] ) 97 && 'elementor' === sanitize_key( wp_unslash( $_GET['action'] ) ) 98 && absint( $_GET['post'] ) > 0; 96 99 97 100 } -
connect-polylang-elementor/trunk/includes/widgets/polylang-language-switcher.php
r3368585 r3418158 731 731 // Max number of items in language dropdown 732 732 if ( 'dropdown' === $settings['layout'] ) { 733 $this->add_render_attribute( '_wrapper', 'style', '--langs:' . ( count( $languages ) - 1) );733 $this->add_render_attribute( '_wrapper', 'style', '--langs:' . ( absint( count( $languages ) - 1 ) ) ); 734 734 } 735 735 -
connect-polylang-elementor/trunk/languages/connect-polylang-elementor.pot
r2932719 r3418158 1 # Copyright (C) 202 3Creame1 # Copyright (C) 2025 Creame 2 2 # This file is distributed under the GPL-2.0-or-later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Connect Polylang for Elementor 2. 4.3\n"5 "Project-Id-Version: Connect Polylang for Elementor 2.5.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/connect-polylang-elementor\n" 7 7 "Last-Translator: Pacotole <[email protected]>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-06-07T16:17:27+00:00\n"12 "POT-Creation-Date: 2025-12-12T10:59:13+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 7.1\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: connect-polylang-elementor\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: connect-polylang-elementor.php 18 19 msgid "Connect Polylang for Elementor" 19 20 msgstr "" 20 21 21 22 #. Plugin URI of the plugin 23 #: connect-polylang-elementor.php 22 24 msgid "https://github.com/creame/connect-polylang-elementor" 23 25 msgstr "" 24 26 25 27 #. Description of the plugin 28 #: connect-polylang-elementor.php 26 29 msgid "Connect Polylang with Elementor. Display templates in the correct language, language switcher widget, language visibility conditions and dynamic tags." 27 30 msgstr "" 28 31 29 32 #. Author of the plugin 33 #: connect-polylang-elementor.php 30 34 msgid "Creame" 31 35 msgstr "" 32 36 33 37 #. Author URI of the plugin 38 #: connect-polylang-elementor.php 34 39 msgid "https://crea.me/" 35 40 msgstr "" … … 55 60 msgstr "" 56 61 57 #: includes/connect-plugins.php:636 62 #: includes/admin-extras.php:96 63 msgid "AI Translation For Polylang" 64 msgstr "" 65 66 #: includes/admin-extras.php:97 67 msgid "AI Translation" 68 msgstr "" 69 70 #: includes/admin-extras.php:98 71 msgid "Affiliated" 72 msgstr "" 73 74 #: includes/connect-plugins.php:694 75 #: includes/connect-plugins.php:953 76 #, php-format 58 77 msgid "Add a translation — %s" 59 78 msgstr "" 60 79 61 #: includes/connect-plugins.php:743 80 #: includes/connect-plugins.php:801 81 #, php-format 62 82 msgid "(from %s)" 83 msgstr "" 84 85 #: includes/connect-plugins.php:954 86 #, php-format 87 msgid "Add a translation in %s" 63 88 msgstr "" 64 89 … … 79 104 80 105 #: includes/dynamic-tags/language-flag.php:46 81 #: includes/widgets/polylang-language-switcher.php:5 52106 #: includes/widgets/polylang-language-switcher.php:548 82 107 msgid "Scalable Image" 83 108 msgstr "" … … 139 164 msgstr "" 140 165 141 #: includes/language-visibility.php:6 6166 #: includes/language-visibility.php:68 142 167 msgid "Language Visibility" 143 168 msgstr "" 144 169 145 #: includes/language-visibility.php:10 6170 #: includes/language-visibility.php:108 146 171 msgid "When language is:" 147 172 msgstr "" 148 173 149 #: includes/widgets/polylang-language-switcher.php:10 8174 #: includes/widgets/polylang-language-switcher.php:104 150 175 msgctxt "Comma separated keywords" 151 176 msgid "languages, switcher, polylang, multilingual, flags, countries, country" 152 177 msgstr "" 153 178 154 #: includes/widgets/polylang-language-switcher.php:1 83155 #: includes/widgets/polylang-language-switcher.php:45 4179 #: includes/widgets/polylang-language-switcher.php:179 180 #: includes/widgets/polylang-language-switcher.php:450 156 181 msgid "Dropdown" 157 182 msgstr "" 158 183 159 #: includes/widgets/polylang-language-switcher.php:2 62184 #: includes/widgets/polylang-language-switcher.php:258 160 185 msgid "Displays language codes" 161 186 msgstr "" 162 187 163 #: includes/widgets/polylang-language-switcher.php:27 5188 #: includes/widgets/polylang-language-switcher.php:271 164 189 msgid "Main Menu" 165 190 msgstr "" 166 191 167 #: includes/widgets/polylang-language-switcher.php: 403192 #: includes/widgets/polylang-language-switcher.php:399 168 193 msgid "Horizontal Padding" 169 194 msgstr "" 170 195 171 #: includes/widgets/polylang-language-switcher.php:41 8196 #: includes/widgets/polylang-language-switcher.php:414 172 197 msgid "Vertical Padding" 173 198 msgstr "" 174 199 200 #: includes/widgets/polylang-language-switcher.php:459 201 msgid "Drop" 202 msgstr "" 203 204 #: includes/widgets/polylang-language-switcher.php:462 205 msgid "On Click" 206 msgstr "" 207 175 208 #: includes/widgets/polylang-language-switcher.php:463 176 msgid "Drop"177 msgstr ""178 179 #: includes/widgets/polylang-language-switcher.php:466180 msgid "On Click"181 msgstr ""182 183 #: includes/widgets/polylang-language-switcher.php:467184 209 msgid "On Mouse Hover" 185 210 msgstr "" 186 211 187 #: includes/widgets/polylang-language-switcher.php:47 7212 #: includes/widgets/polylang-language-switcher.php:473 188 213 msgid "Drop Direction" 189 214 msgstr "" 190 215 191 #: includes/widgets/polylang-language-switcher.php:61 5216 #: includes/widgets/polylang-language-switcher.php:611 192 217 msgid "Language Name" 193 218 msgstr "" 194 219 195 #: includes/widgets/polylang-language-switcher.php:64 5220 #: includes/widgets/polylang-language-switcher.php:641 196 221 msgid "Language Code" 197 222 msgstr ""
Note: See TracChangeset
for help on using the changeset viewer.