Version Description
A fix for edge users were in certain cases Elementor Pro would not load.
Download this release
Release Info
Developer | p4fbradjohnson |
Plugin | Polylang Connect for Elementor – Templates Translation & Language Switcher |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- CHANGES.md +0 -2
- README.md +24 -73
- assets/css/index.php +0 -0
- assets/css/plsfe-editor.css +0 -0
- assets/css/plsfe-editor.min.css +0 -0
- assets/css/plsfe-frontend.css +0 -0
- assets/css/plsfe-frontend.min.css +0 -0
- assets/index.php +0 -0
- connect-polylang-elementor.php +3 -3
- includes/index.php +0 -0
- index.php +0 -0
- languages/README.md +33 -33
- languages/index.php +0 -0
- modules/connect/index.php +0 -0
- modules/dynamic-tags/index.php +0 -0
- modules/finder/index.php +0 -0
- modules/finder/plugin-polylang.php +53 -36
- modules/index.php +0 -0
- modules/widgets/index.php +0 -0
- modules/widgets/polylang-language-switcher.php +19 -13
- readme.txt +4 -1
CHANGES.md
CHANGED
@@ -4,8 +4,6 @@
|
|
4 |
|
5 |
* [Plugin page on WordPress.org: wordpress.org/plugins/connect-polylang-elementor/](https://wordpress.org/plugins/connect-polylang-elementor/)
|
6 |
* [Translate the plugin](https://translate.wordpress.org/projects/wp-plugins/connect-polylang-elementor)
|
7 |
-
* [**Join plugin's newsletter for insider info, tutorials and more**](https://eepurl.com/gbAUUn)
|
8 |
-
* [**Become a Patron**](https://www.patreon.com/deckerweb) and support ongoing development, maintenance and support of this plugin
|
9 |
* [**Donate** for the further development & support of the plugin](https://www.paypal.me/deckerweb)
|
10 |
* [Plugin's documentation & FAQ](https://wordpress.org/plugins/connect-polylang-elementor/#faq)
|
11 |
* [Polylang Users Facebook Group](https://www.facebook.com/groups/polylang.users/)
|
4 |
|
5 |
* [Plugin page on WordPress.org: wordpress.org/plugins/connect-polylang-elementor/](https://wordpress.org/plugins/connect-polylang-elementor/)
|
6 |
* [Translate the plugin](https://translate.wordpress.org/projects/wp-plugins/connect-polylang-elementor)
|
|
|
|
|
7 |
* [**Donate** for the further development & support of the plugin](https://www.paypal.me/deckerweb)
|
8 |
* [Plugin's documentation & FAQ](https://wordpress.org/plugins/connect-polylang-elementor/#faq)
|
9 |
* [Polylang Users Facebook Group](https://www.facebook.com/groups/polylang.users/)
|
README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
**Donate link:** https://www.paypal.me/deckerweb
|
4 |
**Tags:** elementor, polylang, multilingual, language switcher, languages, templates, widget, finder, dynamic tags, deckerweb
|
5 |
**Requires at least:** 4.7
|
6 |
-
**Tested up to:** 5.
|
7 |
**Requires PHP:** 5.6
|
8 |
**Stable tag:** 1.0.0
|
9 |
**License:** GPL-2.0-or-later
|
@@ -31,7 +31,7 @@ Connect the Polylang multilingual plugin with Elementor Page Builder: This plugi
|
|
31 |
* Make a second header template in Elementor, set NO display conditions for this one (by assigning 2 of the same display conditions, you can create a conflict in Elementor), but assign to another Polylang language (Portuguese for example), meaning to link those languages/templates in Polylang.
|
32 |
* Result: when viewing in frontend the proper English content appears with the English header template, translated content in Portuguese appears with the Portuguese header template.
|
33 |
* Go on: The principle is always the same, now add German language, Spanish and so on ;-)
|
34 |
-
* [See **live demo** on co-author's own website](https://
|
35 |
|
36 |
|
37 |
### Plus: Even More Features
|
@@ -45,13 +45,6 @@ Connect the Polylang multilingual plugin with Elementor Page Builder: This plugi
|
|
45 |
* Community collaboration between David Decker and Brad Johnson, and more code coming from the Elementor/Polylang community
|
46 |
|
47 |
|
48 |
-
### Where to Get Support?
|
49 |
-
* [**Polylang User Community Group at Facebook**](https://www.facebook.com/groups/polylang.users/) - highly recommended for all users of this plugin!
|
50 |
-
* We monitor [the plugin's support forum](https://wordpress.org/support/plugin/connect-polylang-elementor) here on WordPress.org as well - but our preferred support channel is the FB community group
|
51 |
-
* **What is covered by our support?** - All regarding THIS plugin ("Polyang Connect for Elementor"), plus the relation to *Polylang*, *Elementor* and *Elementor Pro* of course.
|
52 |
-
* **What is NOT covered by support?** - Anything general regarding multilingual topics and WordPress. Explicitely we **DO NOT** offer any "WPML", "WPBakery" or "Visual Composer" support, and also not for your theme etc.!!!
|
53 |
-
|
54 |
-
|
55 |
### Translations
|
56 |
* English (default, `en_US`) - always included
|
57 |
* German (`de_DE`) - always included
|
@@ -67,21 +60,15 @@ Connect the Polylang multilingual plugin with Elementor Page Builder: This plugi
|
|
67 |
|
68 |
### My Other Plugins
|
69 |
* [**Toolbar Extras for Elementor - WordPress Admin Bar Enhanced**](https://wordpress.org/plugins/connect-polylang-elementor/)
|
70 |
-
* [**Toolbar Extras for Oxygen Builder - Add-On plugin**](https://wordpress.org/plugins/toolbar-extras-oxygen/)
|
71 |
-
* [**Toolbar Extras for MainWP Dashboard - Add-On plugin**](https://wordpress.org/plugins/toolbar-extras-mainwp/)
|
72 |
-
* [**Toolbar Extras for Give Donations (GiveWP) - Add-On plugin**](https://wordpress.org/plugins/toolbar-extras-givewp/)
|
73 |
-
* [**Builder Shortcode Extras – WordPress Shortcodes Collection to Save You Time**](https://wordpress.org/plugins/builder-shortcode-extras/)
|
74 |
* [**Builder Template Categories - for WordPress Page Builders**](https://wordpress.org/plugins/builder-template-categories/)
|
75 |
* [**Simple Download Manager for WP Document Revisions**](https://wordpress.org/plugins/wpdr-simple-downloads/)
|
76 |
* [Genesis What's New Info](https://wordpress.org/plugins/genesis-whats-new-info/)
|
77 |
* [Genesis Layout Extras](https://wordpress.org/plugins/genesis-layout-extras/)
|
78 |
* [Genesis Widgetized Not Found & 404](https://wordpress.org/plugins/genesis-widgetized-notfound/)
|
79 |
-
* [Genesis Extra Settings Transporter](https://wordpress.org/plugins/genesis-extra-settings-transporter/)
|
80 |
* [Genesis Widgetized Footer](https://wordpress.org/plugins/genesis-widgetized-footer/)
|
81 |
* [Genesis Widgetized Archive](https://wordpress.org/plugins/genesis-widgetized-archive/)
|
82 |
* [Multisite Toolbar Additions](https://wordpress.org/plugins/multisite-toolbar-additions/)
|
83 |
* [Cleaner Plugin Installer](https://wordpress.org/plugins/cleaner-plugin-installer/)
|
84 |
-
* [*My plugins newsletter*](https://eepurl.com/gbAUUn)
|
85 |
|
86 |
|
87 |
|
@@ -99,7 +86,7 @@ Connect the Polylang multilingual plugin with Elementor Page Builder: This plugi
|
|
99 |
|
100 |
### We Recommend Your Host Supports at least:
|
101 |
|
102 |
-
* PHP version 7.
|
103 |
* MySQL version 5.6 or higher / or MariaDB 10 or higher
|
104 |
|
105 |
|
@@ -117,65 +104,29 @@ Connect the Polylang multilingual plugin with Elementor Page Builder: This plugi
|
|
117 |
## Frequently Asked Questions
|
118 |
|
119 |
|
120 |
-
### Where to get support?
|
121 |
-
|
122 |
-
At best in our [**Polylang User Community Group at Facebook**](https://www.facebook.com/groups/polylang.users/) - highly recommended for all users of this plugin!
|
123 |
-
|
124 |
-
Additionally, we also monitor [the plugin's support forum](https://wordpress.org/support/plugin/connect-polylang-elementor) here on WordPress.org as well - but our preferred support channel is the FB community group.
|
125 |
-
|
126 |
-
* **What is covered by our support?** - All things regarding THIS plugin ("Polyang Connect for Elementor"), plus the relation to *Polylang*, *Elementor* and *Elementor Pro* of course.
|
127 |
-
* **What is NOT covered by support?** - Anything general regarding multilingual topics and WordPress. Explicitely we **DO NOT** offer any "WPML", "WPBakery" or "Visual Composer" support, and also not for your theme etc.!!!
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
### Is there a live demo?
|
132 |
|
133 |
Yes, there is.
|
134 |
|
135 |
-
[**See live demo on co-author's own website**](https://
|
136 |
|
137 |
[Plus: *bigger* versions of the above screenshots are in this external gallery ;-)](https://www.dropbox.com/sh/3i9tuh76etmhl1a/AADm_4L_aesp8Q9ss5NXuSiMa?dl=0)
|
138 |
|
139 |
|
140 |
|
141 |
-
### Recommended Workflow?
|
142 |
-
|
143 |
-
1. Setup Polylang at first, add at least TWO languages, one of them make your default language (in Polylang)
|
144 |
-
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 :)
|
145 |
-
3. After that setup an Elementor Theme Builder template - asign it to your Polylang default language, apply conditions in Elementor
|
146 |
-
4. Next, setup a translation template for the template of 3.) -- asign your second Polylang language, DO NOT apply conditions in Elementor
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
### Recommended Polylang settings?
|
151 |
-
|
152 |
-
If you have issues with proper display of your translated templates, pages, content it is recommended to check your settings:
|
153 |
-
|
154 |
-
In Polylang Settings at `Languages > Settings > URL Modificatons` set to the following option: "The language is set from the directory name in pretty permalinks"
|
155 |
-
|
156 |
-
And in the case, all is working well with your current settings then please do not touch them. The above recommendation can be necessary for some users/ installs but not necessarily for all.
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
### Will this work with Elementor Popup Builder?
|
161 |
-
|
162 |
-
It most likely will work totally fine if you follow our recommended workflow (see above). If not, please ask in [our FB user group](https://www.facebook.com/groups/polylang.users/).
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
### Correct Elementor template does not show up?
|
167 |
|
168 |
-
Every page/ post/ template must be assigned a language for this to work. This is standard
|
169 |
|
170 |
Also, for Elementor Templates, the post type must be enabled for Polylang support: Go to **Polylang > Settings > Custom post types and Taxonomies**, enable the "My Templates" post type (Elementor).
|
171 |
|
172 |
|
173 |
|
174 |
-
### Where is the Elementor Widget to
|
175 |
|
176 |
It's in the widget category "General Elements". Plus, if Elementor Pro is active and you're editing a template, the widget additionally appears in the "Site" widget category.
|
177 |
|
178 |
-
|
179 |
|
180 |
|
181 |
|
@@ -247,50 +198,50 @@ There are quite a few:
|
|
247 |
## Screenshots
|
248 |
|
249 |
|
250 |
-
### 1. Ensure that my templates is ticked in
|
251 |
-
![Ensure that my templates is ticked in
|
252 |
|
253 |
|
254 |
### 2. Header Template in Elementor showing that they have both been translated
|
255 |
![Header Template in Elementor showing that they have both been translated](https://ps.w.org/connect-polylang-elementor/assets/screenshot-2.png)
|
256 |
|
257 |
|
258 |
-
### 3.
|
259 |
-
![
|
260 |
|
261 |
|
262 |
-
### 4.
|
263 |
-
![
|
264 |
|
265 |
|
266 |
-
### 5.
|
267 |
-
![
|
268 |
|
269 |
|
270 |
### 6. Set your primary language display conditions for your primary language
|
271 |
![kkkk](https://ps.w.org/connect-polylang-elementor/assets/screenshot-6.png)
|
272 |
|
273 |
|
274 |
-
### 7. DO NOT SET A DISPLAY CONDITION FOR ANY OTHER LANGUAGE --->
|
275 |
![Set your primary language display conditions for your primary language](https://ps.w.org/connect-polylang-elementor/assets/screenshot-7.png)
|
276 |
|
277 |
|
278 |
-
### 8. (1/2) Working language header templates on the front end. Styled by the widget. Previously this was not an option in
|
279 |
-
![(1/2) Working language header templates on the front end. Styled by the widget. Previously this was not an option in
|
280 |
|
281 |
|
282 |
-
### 9. (2/2) Working language header templates on the front end. Styled by the widget. Previously this was not an option in
|
283 |
-
![(2/2) Working language header templates on the front end. Styled by the widget. Previously this was not an option in
|
284 |
-
|
285 |
-
|
286 |
-
### 10. Recommended Polylang URL settings if you have issues with translated templates/ templates
|
287 |
-
![Recommended Polylang URL settings if you have issues with translated templates/ templates](https://ps.w.org/connect-polylang-elementor/assets/screenshot-10.png)
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
## Changelog
|
293 |
|
|
|
|
|
|
|
|
|
294 |
|
295 |
### 1.0.0 - 2018-11-28
|
296 |
* Official public release on WordPress.org
|
3 |
**Donate link:** https://www.paypal.me/deckerweb
|
4 |
**Tags:** elementor, polylang, multilingual, language switcher, languages, templates, widget, finder, dynamic tags, deckerweb
|
5 |
**Requires at least:** 4.7
|
6 |
+
**Tested up to:** 5.4
|
7 |
**Requires PHP:** 5.6
|
8 |
**Stable tag:** 1.0.0
|
9 |
**License:** GPL-2.0-or-later
|
31 |
* Make a second header template in Elementor, set NO display conditions for this one (by assigning 2 of the same display conditions, you can create a conflict in Elementor), but assign to another Polylang language (Portuguese for example), meaning to link those languages/templates in Polylang.
|
32 |
* Result: when viewing in frontend the proper English content appears with the English header template, translated content in Portuguese appears with the Portuguese header template.
|
33 |
* Go on: The principle is always the same, now add German language, Spanish and so on ;-)
|
34 |
+
* [See **live demo** on co-author's own website](https://passion4fashion.pt/) // [Screenshot gallery](https://www.dropbox.com/sh/3i9tuh76etmhl1a/AADm_4L_aesp8Q9ss5NXuSiMa?dl=0)
|
35 |
|
36 |
|
37 |
### Plus: Even More Features
|
45 |
* Community collaboration between David Decker and Brad Johnson, and more code coming from the Elementor/Polylang community
|
46 |
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
### Translations
|
49 |
* English (default, `en_US`) - always included
|
50 |
* German (`de_DE`) - always included
|
60 |
|
61 |
### My Other Plugins
|
62 |
* [**Toolbar Extras for Elementor - WordPress Admin Bar Enhanced**](https://wordpress.org/plugins/connect-polylang-elementor/)
|
|
|
|
|
|
|
|
|
63 |
* [**Builder Template Categories - for WordPress Page Builders**](https://wordpress.org/plugins/builder-template-categories/)
|
64 |
* [**Simple Download Manager for WP Document Revisions**](https://wordpress.org/plugins/wpdr-simple-downloads/)
|
65 |
* [Genesis What's New Info](https://wordpress.org/plugins/genesis-whats-new-info/)
|
66 |
* [Genesis Layout Extras](https://wordpress.org/plugins/genesis-layout-extras/)
|
67 |
* [Genesis Widgetized Not Found & 404](https://wordpress.org/plugins/genesis-widgetized-notfound/)
|
|
|
68 |
* [Genesis Widgetized Footer](https://wordpress.org/plugins/genesis-widgetized-footer/)
|
69 |
* [Genesis Widgetized Archive](https://wordpress.org/plugins/genesis-widgetized-archive/)
|
70 |
* [Multisite Toolbar Additions](https://wordpress.org/plugins/multisite-toolbar-additions/)
|
71 |
* [Cleaner Plugin Installer](https://wordpress.org/plugins/cleaner-plugin-installer/)
|
|
|
72 |
|
73 |
|
74 |
|
86 |
|
87 |
### We Recommend Your Host Supports at least:
|
88 |
|
89 |
+
* PHP version 7.0 or higher
|
90 |
* MySQL version 5.6 or higher / or MariaDB 10 or higher
|
91 |
|
92 |
|
104 |
## Frequently Asked Questions
|
105 |
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
### Is there a live demo?
|
108 |
|
109 |
Yes, there is.
|
110 |
|
111 |
+
[**See live demo on co-author's own website**](https://passion4fashion.pt/)
|
112 |
|
113 |
[Plus: *bigger* versions of the above screenshots are in this external gallery ;-)](https://www.dropbox.com/sh/3i9tuh76etmhl1a/AADm_4L_aesp8Q9ss5NXuSiMa?dl=0)
|
114 |
|
115 |
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
### Correct Elementor template does not show up?
|
118 |
|
119 |
+
Every page/ post/ template must be assigned a language for this to work. This is standard PolyLang procedure but it should be noted in case "it doesnt work".
|
120 |
|
121 |
Also, for Elementor Templates, the post type must be enabled for Polylang support: Go to **Polylang > Settings > Custom post types and Taxonomies**, enable the "My Templates" post type (Elementor).
|
122 |
|
123 |
|
124 |
|
125 |
+
### Where is the Elementor Widget to found?
|
126 |
|
127 |
It's in the widget category "General Elements". Plus, if Elementor Pro is active and you're editing a template, the widget additionally appears in the "Site" widget category.
|
128 |
|
129 |
+
When searching for widgets type "polylang" or "languages" and it will show up immediately! ;-)
|
130 |
|
131 |
|
132 |
|
198 |
## Screenshots
|
199 |
|
200 |
|
201 |
+
### 1. Ensure that my templates is ticked in PolyLang post types and Taxonomies. Although the plugin will automatically tick this for you 😊
|
202 |
+
![Ensure that my templates is ticked in PolyLang post types and Taxonomies. Although the plugin will automatically tick this for you 😊](https://ps.w.org/connect-polylang-elementor/assets/screenshot-1.png)
|
203 |
|
204 |
|
205 |
### 2. Header Template in Elementor showing that they have both been translated
|
206 |
![Header Template in Elementor showing that they have both been translated](https://ps.w.org/connect-polylang-elementor/assets/screenshot-2.png)
|
207 |
|
208 |
|
209 |
+
### 3. PolyLang Widget in Elementor under Site
|
210 |
+
![PolyLang Widget in Elementor under Site](https://ps.w.org/connect-polylang-elementor/assets/screenshot-3.png)
|
211 |
|
212 |
|
213 |
+
### 4. PolyLang Widget options in Elementor
|
214 |
+
![PolyLang Widget options in Elementor](https://ps.w.org/connect-polylang-elementor/assets/screenshot-4.png)
|
215 |
|
216 |
|
217 |
+
### 5. PolyLang Widget Styling Options in Elementor
|
218 |
+
![PolyLang Widget Styling Options in Elementor](https://ps.w.org/connect-polylang-elementor/assets/screenshot-5.png)
|
219 |
|
220 |
|
221 |
### 6. Set your primary language display conditions for your primary language
|
222 |
![kkkk](https://ps.w.org/connect-polylang-elementor/assets/screenshot-6.png)
|
223 |
|
224 |
|
225 |
+
### 7. DO NOT SET A DISPLAY CONDITION FOR ANY OTHER LANGUAGE ---> PolyLang will do this for you. Save without conditions
|
226 |
![Set your primary language display conditions for your primary language](https://ps.w.org/connect-polylang-elementor/assets/screenshot-7.png)
|
227 |
|
228 |
|
229 |
+
### 8. (1/2) Working language header templates on the front end. Styled by the widget. Previously this was not an option in PolyLang. (other than editing the menu options) PolyLang users could not display language codes but now they can 😉. Thanks to Polylang Connect for Elementor.
|
230 |
+
![(1/2) Working language header templates on the front end. Styled by the widget. Previously this was not an option in PolyLang. (other than editing the menu options) PolyLang users could not display language codes but now they can 😉. Thanks to Polylang Connect for Elementor.](https://ps.w.org/connect-polylang-elementor/assets/screenshot-8.png)
|
231 |
|
232 |
|
233 |
+
### 9. (2/2) Working language header templates on the front end. Styled by the widget. Previously this was not an option in PolyLang. (other than editing the menu options) PolyLang users could not display language codes but now they can 😉. Thanks to Polylang Connect for Elementor.
|
234 |
+
![(2/2) Working language header templates on the front end. Styled by the widget. Previously this was not an option in PolyLang. (other than editing the menu options) PolyLang users could not display language codes but now they can 😉. Thanks to Polylang Connect for Elementor.](https://ps.w.org/connect-polylang-elementor/assets/screenshot-9.png)
|
|
|
|
|
|
|
|
|
235 |
|
236 |
|
237 |
|
238 |
|
239 |
## Changelog
|
240 |
|
241 |
+
### 1.0.1 - 2020-06-17
|
242 |
+
|
243 |
+
* Stability update for edge cases were experiencing fatal errors
|
244 |
+
* Thanks to sebastienserre for correct fatal unknow pll_the_languages();
|
245 |
|
246 |
### 1.0.0 - 2018-11-28
|
247 |
* Official public release on WordPress.org
|
assets/css/index.php
CHANGED
File without changes
|
assets/css/plsfe-editor.css
CHANGED
File without changes
|
assets/css/plsfe-editor.min.css
CHANGED
File without changes
|
assets/css/plsfe-frontend.css
CHANGED
File without changes
|
assets/css/plsfe-frontend.min.css
CHANGED
File without changes
|
assets/index.php
CHANGED
File without changes
|
connect-polylang-elementor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Main plugin file.
|
4 |
* @package Polylang Connect for Elementor
|
5 |
* @author David Decker
|
6 |
-
* @copyright Copyright (c) 2018
|
7 |
* @license GPL-2.0-or-later
|
8 |
* @link https://deckerweb.de/twitter
|
9 |
*
|
@@ -13,7 +13,7 @@
|
|
13 |
* Description: Connect the Polylang multilingual plugin with Elementor Page Builder: This plugin will make Elementor and Polylang show the correct language templates, especially with Elementor Pro Theme Builder. Plus: native Polylang Language Switcher Elementor widget, new Dynamic Tags, and Polylang links added to the Elementor Finder feature.
|
14 |
* Version: 1.0.0
|
15 |
* Author: David Decker - DECKERWEB
|
16 |
-
* Author URI: https://
|
17 |
* License: GPL-2.0-or-later
|
18 |
* License URI: https://opensource.org/licenses/GPL-2.0
|
19 |
* Text Domain: connect-polylang-elementor
|
@@ -23,7 +23,7 @@
|
|
23 |
* GitHub Plugin URI: https://github.com/deckerweb/connect-polylang-elementor
|
24 |
* GitHub Branch: master
|
25 |
*
|
26 |
-
* Copyright (c) 2018
|
27 |
*/
|
28 |
|
29 |
/**
|
3 |
* Main plugin file.
|
4 |
* @package Polylang Connect for Elementor
|
5 |
* @author David Decker
|
6 |
+
* @copyright Copyright (c) 2018, David Decker - DECKERWEB
|
7 |
* @license GPL-2.0-or-later
|
8 |
* @link https://deckerweb.de/twitter
|
9 |
*
|
13 |
* Description: Connect the Polylang multilingual plugin with Elementor Page Builder: This plugin will make Elementor and Polylang show the correct language templates, especially with Elementor Pro Theme Builder. Plus: native Polylang Language Switcher Elementor widget, new Dynamic Tags, and Polylang links added to the Elementor Finder feature.
|
14 |
* Version: 1.0.0
|
15 |
* Author: David Decker - DECKERWEB
|
16 |
+
* Author URI: https://deckerweb.de/
|
17 |
* License: GPL-2.0-or-later
|
18 |
* License URI: https://opensource.org/licenses/GPL-2.0
|
19 |
* Text Domain: connect-polylang-elementor
|
23 |
* GitHub Plugin URI: https://github.com/deckerweb/connect-polylang-elementor
|
24 |
* GitHub Branch: master
|
25 |
*
|
26 |
+
* Copyright (c) 2018 David Decker - DECKERWEB
|
27 |
*/
|
28 |
|
29 |
/**
|
includes/index.php
CHANGED
File without changes
|
index.php
CHANGED
File without changes
|
languages/README.md
CHANGED
@@ -1,34 +1,34 @@
|
|
1 |
-
# .pot File
|
2 |
-
|
3 |
-
The .pot file is always included in:
|
4 |
-
`/connect-polylang-elementor/languages/connect-polylang-elementor.pot`
|
5 |
-
|
6 |
-
--------------------------------------------------------------------------------
|
7 |
-
|
8 |
-
# Language Packs
|
9 |
-
|
10 |
-
Community Translations for this plugin are handled via:
|
11 |
-
https://translate.wordpress.org/projects/wp-plugins/connect-polylang-elementor
|
12 |
-
|
13 |
-
* You are invited to contribute there for your language
|
14 |
-
* Translations there which are 95% or more complete will be automatically loaded
|
15 |
-
in WordPress as language pack for the plugin and are also updateable
|
16 |
-
|
17 |
-
Thank you for your contribution!
|
18 |
-
|
19 |
-
--------------------------------------------------------------------------------
|
20 |
-
|
21 |
-
# Custom Translations
|
22 |
-
|
23 |
-
If you want or need custom translations different from the Community
|
24 |
-
translations above, you can do that easily:
|
25 |
-
Create your translation with "Poedit" (https://poedit.net/wordpress)
|
26 |
-
or "Loco Translate" plugin (https://wordpress.org/plugins/loco-translate/)
|
27 |
-
and upload the translation file there:
|
28 |
-
`/wp-content/languages/connect-polylang-elementor/`
|
29 |
-
|
30 |
-
for example the German version would looke like that:
|
31 |
-
`/wp-content/languages/connect-polylang-elementor/connect-polylang-elementor-de_DE.mo`
|
32 |
-
|
33 |
-
Note: The location `/wp-content/languages/` is the global translation folder -
|
34 |
if it does not exist yet in your installation just create it.
|
1 |
+
# .pot File
|
2 |
+
|
3 |
+
The .pot file is always included in:
|
4 |
+
`/connect-polylang-elementor/languages/connect-polylang-elementor.pot`
|
5 |
+
|
6 |
+
--------------------------------------------------------------------------------
|
7 |
+
|
8 |
+
# Language Packs
|
9 |
+
|
10 |
+
Community Translations for this plugin are handled via:
|
11 |
+
https://translate.wordpress.org/projects/wp-plugins/connect-polylang-elementor
|
12 |
+
|
13 |
+
* You are invited to contribute there for your language
|
14 |
+
* Translations there which are 95% or more complete will be automatically loaded
|
15 |
+
in WordPress as language pack for the plugin and are also updateable
|
16 |
+
|
17 |
+
Thank you for your contribution!
|
18 |
+
|
19 |
+
--------------------------------------------------------------------------------
|
20 |
+
|
21 |
+
# Custom Translations
|
22 |
+
|
23 |
+
If you want or need custom translations different from the Community
|
24 |
+
translations above, you can do that easily:
|
25 |
+
Create your translation with "Poedit" (https://poedit.net/wordpress)
|
26 |
+
or "Loco Translate" plugin (https://wordpress.org/plugins/loco-translate/)
|
27 |
+
and upload the translation file there:
|
28 |
+
`/wp-content/languages/connect-polylang-elementor/`
|
29 |
+
|
30 |
+
for example the German version would looke like that:
|
31 |
+
`/wp-content/languages/connect-polylang-elementor/connect-polylang-elementor-de_DE.mo`
|
32 |
+
|
33 |
+
Note: The location `/wp-content/languages/` is the global translation folder -
|
34 |
if it does not exist yet in your installation just create it.
|
languages/index.php
CHANGED
File without changes
|
modules/connect/index.php
CHANGED
File without changes
|
modules/dynamic-tags/index.php
CHANGED
File without changes
|
modules/finder/index.php
CHANGED
File without changes
|
modules/finder/plugin-polylang.php
CHANGED
@@ -74,45 +74,62 @@ class DDW_Polylang_Plugin_Finder_Category extends \Elementor\Core\Common\Modules
|
|
74 |
$action_icon = 'eye';
|
75 |
|
76 |
/** List all setup languages */
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
'
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
'
|
90 |
-
|
91 |
-
|
|
|
|
|
92 |
],
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
$items[ 'polylang-language-' . $lang_data->slug ] = [
|
101 |
-
'title' => $string_polylang_lang . $lang_data->name,
|
102 |
-
'url' => esc_url_raw( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $lang_data->term_id ) ),
|
103 |
-
'icon' => 'edit',
|
104 |
-
'keywords' => [ 'polylang', 'language', $lang_data->name, $lang_data->slug, 'country', $lang_data->locale ],
|
105 |
-
'description' => __( 'Edit this language', 'connect-polylang-elementor' ),
|
106 |
-
'actions' => [
|
107 |
-
[
|
108 |
-
'name' => $action_name,
|
109 |
-
'url' => esc_url( $lang_data->home_url ),
|
110 |
-
'icon' => $action_icon,
|
111 |
],
|
112 |
-
]
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
-
|
|
|
116 |
|
117 |
/** Settings: Languages setup */
|
118 |
$items[ 'languages' ] = [
|
74 |
$action_icon = 'eye';
|
75 |
|
76 |
/** List all setup languages */
|
77 |
+
if ( function_exists( 'pll_languages_list' ) ) {
|
78 |
+
$languages = pll_languages_list( array( 'fields' => false ) );
|
79 |
+
|
80 |
+
foreach ( $languages as $lang_data ) {
|
81 |
+
|
82 |
+
$items[ 'website-language-' . $lang_data->slug ] = [
|
83 |
+
'title' => $string_website_lang . $lang_data->name,
|
84 |
+
'url' => esc_url( $lang_data->home_url ),
|
85 |
+
'icon' => 'eye',
|
86 |
+
'keywords' => [
|
87 |
+
'website',
|
88 |
+
'polylang',
|
89 |
+
'language',
|
90 |
+
$lang_data->name,
|
91 |
+
$lang_data->slug,
|
92 |
+
'country',
|
93 |
+
$lang_data->locale
|
94 |
],
|
95 |
+
'description' => __( 'View website in this language', 'connect-polylang-elementor' ),
|
96 |
+
'actions' => [
|
97 |
+
[
|
98 |
+
'name' => 'edit',
|
99 |
+
'url' => esc_url_raw( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $lang_data->term_id ) ),
|
100 |
+
'icon' => 'edit',
|
101 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
],
|
103 |
+
];
|
104 |
+
|
105 |
+
} // end foreach
|
106 |
+
|
107 |
+
foreach ( $languages as $lang_data ) {
|
108 |
+
|
109 |
+
$items[ 'polylang-language-' . $lang_data->slug ] = [
|
110 |
+
'title' => $string_polylang_lang . $lang_data->name,
|
111 |
+
'url' => esc_url_raw( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $lang_data->term_id ) ),
|
112 |
+
'icon' => 'edit',
|
113 |
+
'keywords' => [
|
114 |
+
'polylang',
|
115 |
+
'language',
|
116 |
+
$lang_data->name,
|
117 |
+
$lang_data->slug,
|
118 |
+
'country',
|
119 |
+
$lang_data->locale
|
120 |
+
],
|
121 |
+
'description' => __( 'Edit this language', 'connect-polylang-elementor' ),
|
122 |
+
'actions' => [
|
123 |
+
[
|
124 |
+
'name' => $action_name,
|
125 |
+
'url' => esc_url( $lang_data->home_url ),
|
126 |
+
'icon' => $action_icon,
|
127 |
+
],
|
128 |
+
],
|
129 |
+
];
|
130 |
|
131 |
+
} // end foreach
|
132 |
+
}
|
133 |
|
134 |
/** Settings: Languages setup */
|
135 |
$items[ 'languages' ] = [
|
modules/index.php
CHANGED
File without changes
|
modules/widgets/index.php
CHANGED
File without changes
|
modules/widgets/polylang-language-switcher.php
CHANGED
@@ -10,6 +10,7 @@ use Elementor\Scheme_Color;
|
|
10 |
use Elementor\Scheme_Typography;
|
11 |
use Elementor\Group_Control_Border;
|
12 |
use Elementor\Group_Control_Typography;
|
|
|
13 |
|
14 |
|
15 |
/**
|
@@ -270,26 +271,28 @@ class Polylang_Language_Switcher extends Widget_Base {
|
|
270 |
);
|
271 |
|
272 |
/** Create language drop-down for the select control */
|
|
|
273 |
$languages = pll_the_languages( array( 'raw' => 1 ) );
|
274 |
$dropdown = [];
|
275 |
|
276 |
foreach ( $languages as $language ) {
|
277 |
-
$dropdown[ $language[
|
278 |
}
|
279 |
|
280 |
-
$first_key[
|
281 |
|
282 |
$dropdown = array_merge( $first_key, $dropdown );
|
283 |
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
|
|
293 |
|
294 |
$this->end_controls_section();
|
295 |
|
@@ -674,7 +677,10 @@ class Polylang_Language_Switcher extends Widget_Base {
|
|
674 |
] );
|
675 |
|
676 |
/** Get the available languages for a switcher */
|
677 |
-
$languages =
|
|
|
|
|
|
|
678 |
|
679 |
/** If there are language - render output */
|
680 |
if ( ! empty( $languages ) ) {
|
@@ -706,7 +712,7 @@ class Polylang_Language_Switcher extends Widget_Base {
|
|
706 |
echo ( $language[ 'current_lang' ] ) ? '<a href="' . $language[ 'url' ] . '" class="plsfe-item plsfe-item__active">' : '<a href="' . $language[ 'url' ] . '" class="plsfe-item">';
|
707 |
|
708 |
echo $settings[ 'show_country_flag' ] ? '<span class="plsfe-country-flag"><img src="' . $language[ 'flag' ] . '" alt="' . $language_code . '" width="16" height="11" /></span>' : '';
|
709 |
-
|
710 |
echo $settings[ 'show_language_name' ] ? '<span class="plsfe-language-name">' . $language_name . '</span>' : '';
|
711 |
|
712 |
echo $settings[ 'before_language_code' ] ?: '';
|
10 |
use Elementor\Scheme_Typography;
|
11 |
use Elementor\Group_Control_Border;
|
12 |
use Elementor\Group_Control_Typography;
|
13 |
+
use function function_exists;
|
14 |
|
15 |
|
16 |
/**
|
271 |
);
|
272 |
|
273 |
/** Create language drop-down for the select control */
|
274 |
+
if ( function_exists( 'pll_the_languages' ) ) {
|
275 |
$languages = pll_the_languages( array( 'raw' => 1 ) );
|
276 |
$dropdown = [];
|
277 |
|
278 |
foreach ( $languages as $language ) {
|
279 |
+
$dropdown[ $language['slug'] ] = $language['name'];
|
280 |
}
|
281 |
|
282 |
+
$first_key['all'] = __( 'All languages', 'connect-polylang-elementor' );
|
283 |
|
284 |
$dropdown = array_merge( $first_key, $dropdown );
|
285 |
|
286 |
+
$this->add_control(
|
287 |
+
'plsfe_widget_display',
|
288 |
+
[
|
289 |
+
'label' => __( 'Display widget for:', 'connect-polylang-elementor' ),
|
290 |
+
'type' => Controls_Manager::SELECT,
|
291 |
+
'default' => 'all',
|
292 |
+
'options' => $dropdown,
|
293 |
+
]
|
294 |
+
);
|
295 |
+
}
|
296 |
|
297 |
$this->end_controls_section();
|
298 |
|
677 |
] );
|
678 |
|
679 |
/** Get the available languages for a switcher */
|
680 |
+
$languages = '';
|
681 |
+
if ( function_exists( 'pll_the_languages' ) ) {
|
682 |
+
$languages = pll_the_languages( array( 'raw' => 1 ) );
|
683 |
+
}
|
684 |
|
685 |
/** If there are language - render output */
|
686 |
if ( ! empty( $languages ) ) {
|
712 |
echo ( $language[ 'current_lang' ] ) ? '<a href="' . $language[ 'url' ] . '" class="plsfe-item plsfe-item__active">' : '<a href="' . $language[ 'url' ] . '" class="plsfe-item">';
|
713 |
|
714 |
echo $settings[ 'show_country_flag' ] ? '<span class="plsfe-country-flag"><img src="' . $language[ 'flag' ] . '" alt="' . $language_code . '" width="16" height="11" /></span>' : '';
|
715 |
+
|
716 |
echo $settings[ 'show_language_name' ] ? '<span class="plsfe-language-name">' . $language_name . '</span>' : '';
|
717 |
|
718 |
echo $settings[ 'before_language_code' ] ?: '';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: daveshine, p4fbradjohnson, deckerweb, wpautobahn
|
|
3 |
Donate link: https://www.paypal.me/deckerweb
|
4 |
Tags: elementor, polylang, multilingual, language switcher, languages, templates, widget, finder, dynamic tags, deckerweb
|
5 |
Requires at least: 4.7
|
6 |
-
Tested up to: 5.
|
7 |
Requires PHP: 5.6
|
8 |
Stable tag: 1.0.1
|
9 |
License: GPL-2.0-or-later
|
@@ -278,6 +278,9 @@ There are quite a few:
|
|
278 |
|
279 |
== Upgrade Notice ==
|
280 |
|
|
|
|
|
|
|
281 |
= 1.0.0 =
|
282 |
Just released into the wild.
|
283 |
|
3 |
Donate link: https://www.paypal.me/deckerweb
|
4 |
Tags: elementor, polylang, multilingual, language switcher, languages, templates, widget, finder, dynamic tags, deckerweb
|
5 |
Requires at least: 4.7
|
6 |
+
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
Stable tag: 1.0.1
|
9 |
License: GPL-2.0-or-later
|
278 |
|
279 |
== Upgrade Notice ==
|
280 |
|
281 |
+
= 1.0.1 =
|
282 |
+
A fix for edge users were in certain cases Elementor Pro would not load.
|
283 |
+
|
284 |
= 1.0.0 =
|
285 |
Just released into the wild.
|
286 |
|