Version Description
(2022-05-17) =
- Pro: Fix a fatal error when inserting a term
- Pro: Fix translation of the block cover when duplicating a post
- Pro: Fix a CSS issue in bulk tranlate form introduced by WP 6.0
- Pro: Fix a CSS issue in string import/export metaboxes.
- Prevent random languages order in WP 6.0 #1041
- Translate site title in retrieve password email #1042
- Fix 'lang' attribute in language widget dropdown #1039
Download this release
Release Info
Developer | Chouby |
Plugin | Polylang |
Version | 3.2.3 |
Comparing to | |
See all releases |
Code changes from version 3.2.2 to 3.2.3
- changelog.txt +51 -0
- css/build/admin.css +2 -29
- css/build/admin.min.css +1 -1
- include/base.php +1 -1
- include/model.php +49 -2
- include/walker-dropdown.php +1 -1
- polylang.php +2 -2
- readme.txt +31 -66
changelog.txt
CHANGED
@@ -2,6 +2,57 @@
|
|
2 |
|
3 |
This file contains only old changelog. See readme.txt for newer versions.
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
= 3.0.6 (2021-06-22) =
|
6 |
|
7 |
* Fix a conflict with the WooCommerce cart translation and cache plugins #876
|
2 |
|
3 |
This file contains only old changelog. See readme.txt for newer versions.
|
4 |
|
5 |
+
= 3.1.4 (2022-01-31) =
|
6 |
+
|
7 |
+
* Pro: Adapt duplication and synchronization of the gallery block refactored in WP 5.9
|
8 |
+
* Fix UI glitch in the classic editor custom fields form when changing a post language in WP 5.9 #970
|
9 |
+
|
10 |
+
= 3.1.3 (2021-12-14) =
|
11 |
+
|
12 |
+
* Fix user description escaping #934
|
13 |
+
* Fix dismissable notice when creating a term in WP 5.9 #936
|
14 |
+
* Fix empty search not handled correctly. Props Dominik Schilling #937
|
15 |
+
* Fix warning occurring when a 3rd party plugin attempts to register anything else than a string using the WPML API #942
|
16 |
+
* Fix Yoast SEO columns not corectly drawn when quick editing a post #943
|
17 |
+
|
18 |
+
= 3.1.2 (2021-10-11) =
|
19 |
+
|
20 |
+
* Pro: Fix parent page not filtered by language in the block editor since WP 5.6
|
21 |
+
* Pro: Fix XLIFF mime type for PHP 7.0 and PHP 7.1
|
22 |
+
* Fix settings page displaying the media modules whne no language are defined
|
23 |
+
* Enforce Yoast SEO to use dynamic permalinks #882
|
24 |
+
* Yoast SEO: Fix static front page and blog page breadcrumb
|
25 |
+
|
26 |
+
= 3.1.1 (2021-08-16) =
|
27 |
+
|
28 |
+
* Pro: Fix a fatal error with The Events Calendar
|
29 |
+
* Allow to remove the cookie with the pll_cookie_expiration filter #905
|
30 |
+
|
31 |
+
= 3.1 (2021-07-27) =
|
32 |
+
|
33 |
+
* Add compatibility with WordPress 5.8
|
34 |
+
* Raise Minimum WordPress version to 5.4
|
35 |
+
* Pro: Allow to filter blocks by language in the widget block editor
|
36 |
+
* Pro: Allow to export and import XLIFF files for string translations
|
37 |
+
* Pro: Add the language switcher in the navigation block (experimental)
|
38 |
+
* Pro: Replace dashicons by svg icons in the block editor
|
39 |
+
* Pro: The Events Calendar: Add compatibility with Views V2 (only for sites using only one domain)
|
40 |
+
* Pro: Fix + icon displayed in the block editor sidebar when the user cannot create a translation
|
41 |
+
* Add a warning section to the site health for posts and terms without languages #825
|
42 |
+
* Require the simplexml extension in the site health if a wpml-config.xml is found #827
|
43 |
+
* Remove the information about the WPML compabitility mode in settings #843
|
44 |
+
* The browser preferred language detection is now deactivated by default
|
45 |
+
* The media are now untranslated by default
|
46 |
+
* Highlight the language filter in the admin toolbar when it's active #821
|
47 |
+
* Allow to query comments in multiple languages (just as posts and terms) #840
|
48 |
+
* Don't disable the translation input field in the classic metabox #841 Props Onatcer
|
49 |
+
* Optimize all images including flags #848 Props lowwebtech
|
50 |
+
* Don't redirect if WordPress doesn't validate the redirect url to avoid redirects to /wp-admin/ #879
|
51 |
+
* Fix media appearing to have a language after the language is changed in the media library grid view #807
|
52 |
+
* Fix media not all deleted when bulk deleting from the grid view of the media library #830
|
53 |
+
* Fix when more than one language switcher are added to the same menu #853
|
54 |
+
* Fix PHP notice when adding a CPT archive link to a menu #868 Props davidwebca
|
55 |
+
|
56 |
= 3.0.6 (2021-06-22) =
|
57 |
|
58 |
* Fix a conflict with the WooCommerce cart translation and cache plugins #876
|
css/build/admin.css
CHANGED
@@ -335,8 +335,8 @@
|
|
335 |
#wp-admin-bar-languages.pll-filtered-languages {
|
336 |
background: #a03f3f;
|
337 |
}
|
338 |
-
|
339 |
-
#wpadminbar #wp-admin-bar-languages.pll-filtered-languages span.ab-label{
|
340 |
color: #fff;
|
341 |
}
|
342 |
|
@@ -354,25 +354,6 @@
|
|
354 |
margin-right: 10px;
|
355 |
}
|
356 |
|
357 |
-
/* Metaboxes holder in Strings translations screen */
|
358 |
-
.languages_page_mlang_strings .metabox-holder > div {
|
359 |
-
display: flex;
|
360 |
-
}
|
361 |
-
.languages_page_mlang_strings .metabox-holder > div > div {
|
362 |
-
flex-grow: 1;
|
363 |
-
}
|
364 |
-
.languages_page_mlang_strings .metabox-holder > div > div:nth-child(2n) {
|
365 |
-
margin-left: 1rem;
|
366 |
-
}
|
367 |
-
.languages_page_mlang_strings .metabox-holder > div > div.closed {
|
368 |
-
border:0;
|
369 |
-
background: none;
|
370 |
-
}
|
371 |
-
.languages_page_mlang_strings .metabox-holder > div > div.closed .postbox-header{
|
372 |
-
border: 1px solid #ccd0d4;
|
373 |
-
background: #fff;
|
374 |
-
}
|
375 |
-
|
376 |
@media screen and ( max-width: 782px ) {
|
377 |
/* settings */
|
378 |
#wpbody-content .pll-settings .pll-configure > td {
|
@@ -414,14 +395,6 @@
|
|
414 |
width: 95%;
|
415 |
}
|
416 |
|
417 |
-
/* Metaboxes holder in Strings translations screen */
|
418 |
-
.languages_page_mlang_strings .metabox-holder > div {
|
419 |
-
flex-direction: column;
|
420 |
-
}
|
421 |
-
.languages_page_mlang_strings .metabox-holder > div > div:nth-child(2n) {
|
422 |
-
margin-left: 0;
|
423 |
-
}
|
424 |
-
|
425 |
/* hide selected language flag and translations language name */
|
426 |
#select-add-term-language .pll-select-flag,
|
427 |
#select-edit-term-language .pll-select-flag,
|
335 |
#wp-admin-bar-languages.pll-filtered-languages {
|
336 |
background: #a03f3f;
|
337 |
}
|
338 |
+
|
339 |
+
#wpadminbar #wp-admin-bar-languages.pll-filtered-languages span.ab-label{ /* Enforce white color for WordPress admin light theme. */
|
340 |
color: #fff;
|
341 |
}
|
342 |
|
354 |
margin-right: 10px;
|
355 |
}
|
356 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
@media screen and ( max-width: 782px ) {
|
358 |
/* settings */
|
359 |
#wpbody-content .pll-settings .pll-configure > td {
|
395 |
width: 95%;
|
396 |
}
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
/* hide selected language flag and translations language name */
|
399 |
#select-add-term-language .pll-select-flag,
|
400 |
#select-edit-term-language .pll-select-flag,
|
css/build/admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#add-lang select{width:95%}#add-lang label,.pll-legend{margin:.35em 0 .5em}.pll-legend{color:#1d2327;display:block;font-weight:400;padding:2px 0;text-shadow:none}.column-locale,.languages .column-slug{width:15%}.column-default_lang{width:5%}.column-count,.column-flag,.column-term_group{width:10%}.icon-default-lang:before{content:"\f155";font-family:dashicons}.pll-icon:before{display:inline-block;text-align:left;width:15px}.pll-circle:before{content:"\25cf"}#pll-about-box p,#pll-recommended p{text-align:justify}#pll-about-box input{float:right;margin:0;padding:0}.stringstranslations .column-context,.stringstranslations .column-name{width:10%}.stringstranslations .column-string{width:33%}.translation label{display:inline-block;vertical-align:top;width:23%}.translation{display:flex}@media screen and (max-width:782px){.translation{display:block}}.translation textarea{display:block}.translation input,.translation textarea{box-sizing:border-box;margin-bottom:4px;width:72%}.pll-settings{margin-top:20px}.pll-settings .plugin-title{width:25%}#wpbody-content .pll-settings .pll-configure tr{display:table-row}#wpbody-content .pll-settings .pll-configure td{display:table-cell}#wpbody-content .pll-settings .pll-configure>td{padding:20px 20px 20px 40px}.pll-configure legend{font-size:14px;font-weight:600;margin-bottom:.5em}.pll-configure td .description{margin-bottom:.5em;margin-top:2px}.pll-configure p.submit{margin-top:20px}.pll-configure .button{margin-right:20px}.pll-configure fieldset{margin-bottom:1.5em}.pll-inline-block-list{margin:0}.pll-inline-block-list li{display:inline-block;margin:0;width:250px}#pll-domains-table td{border:none;-webkit-box-shadow:none;box-shadow:none;padding:2px 2px 2px 1.5em}.pll-settings-url-col{display:inline-block;vertical-align:top;width:49%}#pll-licenses-table td{vertical-align:top}#pll-licenses-table label{font-size:1em;font-weight:600}.pll-configure .pll-deactivate-license{margin:0 0 0 20px}.wp-list-table td[class*=column-language_],.wp-list-table th[class*=column-language_]{box-sizing:content-box;width:1.5em}.pll-dir-rtl input[type=text],.pll-dir-rtl textarea{direction:rtl}.pll-dir-ltr input[type=text],.pll-dir-ltr textarea{direction:ltr}.pll-dir-ltr .tr_lang,.pll-dir-rtl .tr_lang{direction:inherit}#ml_box p{margin-top:1em}#post-translations p{float:left;margin-top:1em}.rtl #post-translations p{float:right}#post-translations table{clear:both;table-layout:fixed;width:100%}#post-translations a{text-decoration:none}#post-translations .pll-column-icon,#post-translations .pll-language-column{width:20px}#post-translations .tr_lang{width:100%}#post-translations td{padding:2px}#post-translations .spinner,#term-translations .spinner{background-position:50%;float:none;margin:0;width:auto}#select-post-language .pll-select-flag{margin-right:10px;padding:4px}.rtl #select-post-language .pll-select-flag{margin-left:10px;margin-right:0;padding:4px}#select-media-language .pll-select-flag{margin-right:10px;padding:4px}.pll-media-edit-column{float:right}.pll-translation-flag{margin-right:14px}#select-add-term-language .pll-select-flag{margin-right:13px;padding:11px}#select-edit-term-language .pll-select-flag{margin-right:4px;padding:11px}#term-translations p{color:#23282d;font-style:normal;font-weight:400;padding:2px}#add-term-translations,#edit-term-translations{width:95%}#term-translations .pll-language-column{line-height:28px;width:20%}#add-term-translations .pll-language-column,#term-translations .pll-edit-column{width:20px}#edit-term-translations .pll-language-column{font-weight:400;padding:15px 10px}.pll_icon_add:before{content:"\f132"}.pll_icon_edit:before{content:"\f464"}[class^=pll_icon_]{font:20px/1 dashicons;vertical-align:middle}#wpadminbar #wp-admin-bar-languages .ab-item img{margin:0 8px 0 2px}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{float:none;top:4px}#wpadminbar #wp-admin-bar-languages .ab-icon:before{content:"\f326";top:1px}#wp-admin-bar-languages.pll-filtered-languages{background:#a03f3f}#wpadminbar #wp-admin-bar-languages.pll-filtered-languages span.ab-label{color:#fff}.pll-notice.notice{padding-right:38px;position:relative}.pll-notice a.notice-dismiss{text-decoration:none}.pll-notice .button{margin-right:10px}
|
1 |
+
#add-lang select{width:95%}#add-lang label,.pll-legend{margin:.35em 0 .5em}.pll-legend{color:#1d2327;display:block;font-weight:400;padding:2px 0;text-shadow:none}.column-locale,.languages .column-slug{width:15%}.column-default_lang{width:5%}.column-count,.column-flag,.column-term_group{width:10%}.icon-default-lang:before{content:"\f155";font-family:dashicons}.pll-icon:before{display:inline-block;text-align:left;width:15px}.pll-circle:before{content:"\25cf"}#pll-about-box p,#pll-recommended p{text-align:justify}#pll-about-box input{float:right;margin:0;padding:0}.stringstranslations .column-context,.stringstranslations .column-name{width:10%}.stringstranslations .column-string{width:33%}.translation label{display:inline-block;vertical-align:top;width:23%}.translation{display:flex}@media screen and (max-width:782px){.translation{display:block}}.translation textarea{display:block}.translation input,.translation textarea{box-sizing:border-box;margin-bottom:4px;width:72%}.pll-settings{margin-top:20px}.pll-settings .plugin-title{width:25%}#wpbody-content .pll-settings .pll-configure tr{display:table-row}#wpbody-content .pll-settings .pll-configure td{display:table-cell}#wpbody-content .pll-settings .pll-configure>td{padding:20px 20px 20px 40px}.pll-configure legend{font-size:14px;font-weight:600;margin-bottom:.5em}.pll-configure td .description{margin-bottom:.5em;margin-top:2px}.pll-configure p.submit{margin-top:20px}.pll-configure .button{margin-right:20px}.pll-configure fieldset{margin-bottom:1.5em}.pll-inline-block-list{margin:0}.pll-inline-block-list li{display:inline-block;margin:0;width:250px}#pll-domains-table td{border:none;-webkit-box-shadow:none;box-shadow:none;padding:2px 2px 2px 1.5em}.pll-settings-url-col{display:inline-block;vertical-align:top;width:49%}#pll-licenses-table td{vertical-align:top}#pll-licenses-table label{font-size:1em;font-weight:600}.pll-configure .pll-deactivate-license{margin:0 0 0 20px}.wp-list-table td[class*=column-language_],.wp-list-table th[class*=column-language_]{box-sizing:content-box;width:1.5em}.pll-dir-rtl input[type=text],.pll-dir-rtl textarea{direction:rtl}.pll-dir-ltr input[type=text],.pll-dir-ltr textarea{direction:ltr}.pll-dir-ltr .tr_lang,.pll-dir-rtl .tr_lang{direction:inherit}#ml_box p{margin-top:1em}#post-translations p{float:left;margin-top:1em}.rtl #post-translations p{float:right}#post-translations table{clear:both;table-layout:fixed;width:100%}#post-translations a{text-decoration:none}#post-translations .pll-column-icon,#post-translations .pll-language-column{width:20px}#post-translations .tr_lang{width:100%}#post-translations td{padding:2px}#post-translations .spinner,#term-translations .spinner{background-position:50%;float:none;margin:0;width:auto}#select-post-language .pll-select-flag{margin-right:10px;padding:4px}.rtl #select-post-language .pll-select-flag{margin-left:10px;margin-right:0;padding:4px}#select-media-language .pll-select-flag{margin-right:10px;padding:4px}.pll-media-edit-column{float:right}.pll-translation-flag{margin-right:14px}#select-add-term-language .pll-select-flag{margin-right:13px;padding:11px}#select-edit-term-language .pll-select-flag{margin-right:4px;padding:11px}#term-translations p{color:#23282d;font-style:normal;font-weight:400;padding:2px}#add-term-translations,#edit-term-translations{width:95%}#term-translations .pll-language-column{line-height:28px;width:20%}#add-term-translations .pll-language-column,#term-translations .pll-edit-column{width:20px}#edit-term-translations .pll-language-column{font-weight:400;padding:15px 10px}.pll_icon_add:before{content:"\f132"}.pll_icon_edit:before{content:"\f464"}[class^=pll_icon_]{font:20px/1 dashicons;vertical-align:middle}#wpadminbar #wp-admin-bar-languages .ab-item img{margin:0 8px 0 2px}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{float:none;top:4px}#wpadminbar #wp-admin-bar-languages .ab-icon:before{content:"\f326";top:1px}#wp-admin-bar-languages.pll-filtered-languages{background:#a03f3f}#wpadminbar #wp-admin-bar-languages.pll-filtered-languages span.ab-label{color:#fff}.pll-notice.notice{padding-right:38px;position:relative}.pll-notice a.notice-dismiss{text-decoration:none}.pll-notice .button{margin-right:10px}@media screen and (max-width:782px){#wpbody-content .pll-settings .pll-configure>td{padding:20px}#wpbody-content .pll-settings #cb{padding:20px 9px}.pll-inline-block{width:auto}.pll-settings-url-col{display:block;width:100%}#wpbody-content .pll-settings #pll-licenses-table td{display:block}.pll-configure .pll-deactivate-license{margin:10px 0 5px}.translation label{display:block;padding-left:0;width:95%}.translation input,.translation textarea{width:95%}#edit-term-translations .pll-language-name,#select-add-term-language .pll-select-flag,#select-edit-term-language .pll-select-flag{display:none}#edit-term-translations{width:100%}#add-term-translations .pll-language-column{line-height:38px}#edit-term-translations td{padding:8px 10px}#edit-term-translations .pll-edit-column,#edit-term-translations .pll-language-column{width:20px}.term-translations .pll-edit-column,.term-translations .pll-language-column,.term-translations .pll-translation-column{display:table-cell}.term-translations .hidden{display:none}#wpadminbar #wp-admin-bar-languages{display:block}#wpadminbar #wp-admin-bar-languages>.ab-item{text-align:center;width:50px}#wpadminbar #wp-admin-bar-languages>.ab-item .ab-icon:before{font:32px/1 dashicons;top:-1px}#wpadminbar #wp-admin-bar-languages>.ab-item img{margin:19px 0}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{font-size:20px!important;line-height:20px!important;margin-right:6px}}
|
include/base.php
CHANGED
@@ -62,7 +62,7 @@ abstract class PLL_Base {
|
|
62 |
add_action( 'pll_language_defined', array( $this, 'load_strings_translations' ), 5 );
|
63 |
add_action( 'change_locale', array( $this, 'load_strings_translations' ) ); // Since WP 4.7
|
64 |
add_action( 'personal_options_update', array( $this, 'load_strings_translations' ), 1, 0 ); // Before WP, for confirmation request when changing the user email.
|
65 |
-
|
66 |
// Switch_to_blog
|
67 |
add_action( 'switch_blog', array( $this, 'switch_blog' ), 10, 2 );
|
68 |
}
|
62 |
add_action( 'pll_language_defined', array( $this, 'load_strings_translations' ), 5 );
|
63 |
add_action( 'change_locale', array( $this, 'load_strings_translations' ) ); // Since WP 4.7
|
64 |
add_action( 'personal_options_update', array( $this, 'load_strings_translations' ), 1, 0 ); // Before WP, for confirmation request when changing the user email.
|
65 |
+
add_action( 'lostpassword_post', array( $this, 'load_strings_translations' ), 10, 0 ); // Password reset email.
|
66 |
// Switch_to_blog
|
67 |
add_action( 'switch_blog', array( $this, 'switch_blog' ), 10, 2 );
|
68 |
}
|
include/model.php
CHANGED
@@ -86,8 +86,7 @@ class PLL_Model {
|
|
86 |
if ( ( defined( 'PLL_CACHE_LANGUAGES' ) && ! PLL_CACHE_LANGUAGES ) || false === ( $languages = get_transient( 'pll_languages_list' ) ) ) {
|
87 |
$languages = array();
|
88 |
|
89 |
-
$post_languages =
|
90 |
-
$post_languages = empty( $post_languages ) || is_wp_error( $post_languages ) ? array() : $post_languages;
|
91 |
|
92 |
$term_languages = get_terms( 'term_language', array( 'hide_empty' => false ) );
|
93 |
$term_languages = empty( $term_languages ) || is_wp_error( $term_languages ) ?
|
@@ -706,4 +705,52 @@ class PLL_Model {
|
|
706 |
|
707 |
return $term_ids;
|
708 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
}
|
86 |
if ( ( defined( 'PLL_CACHE_LANGUAGES' ) && ! PLL_CACHE_LANGUAGES ) || false === ( $languages = get_transient( 'pll_languages_list' ) ) ) {
|
87 |
$languages = array();
|
88 |
|
89 |
+
$post_languages = $this->get_language_terms();
|
|
|
90 |
|
91 |
$term_languages = get_terms( 'term_language', array( 'hide_empty' => false ) );
|
92 |
$term_languages = empty( $term_languages ) || is_wp_error( $term_languages ) ?
|
705 |
|
706 |
return $term_ids;
|
707 |
}
|
708 |
+
|
709 |
+
/**
|
710 |
+
* Filters the ORDERBY clause of the languages query.
|
711 |
+
* This allows to order languages by `term_group` and `term_id`.
|
712 |
+
*
|
713 |
+
* @since 3.2.3
|
714 |
+
*
|
715 |
+
* @param string $orderby `ORDERBY` clause of the terms query.
|
716 |
+
* @param array $args An array of term query arguments.
|
717 |
+
* @param string[] $taxonomies An array of taxonomy names.
|
718 |
+
* @return string
|
719 |
+
*/
|
720 |
+
public function filter_language_terms_orderby( $orderby, $args, $taxonomies ) {
|
721 |
+
if ( ! is_array( $taxonomies ) || count( $taxonomies ) > 1 ) {
|
722 |
+
return $orderby;
|
723 |
+
}
|
724 |
+
|
725 |
+
if ( 'language' !== reset( $taxonomies ) ) {
|
726 |
+
return $orderby;
|
727 |
+
}
|
728 |
+
|
729 |
+
if ( empty( $orderby ) || ! is_string( $orderby ) ) {
|
730 |
+
return $orderby;
|
731 |
+
}
|
732 |
+
|
733 |
+
if ( ! preg_match( '@^(?<alias>[^.]+)\.term_group$@', $orderby, $matches ) ) {
|
734 |
+
return $orderby;
|
735 |
+
}
|
736 |
+
|
737 |
+
return sprintf( '%1$s.term_group, %1$s.term_id', $matches['alias'] );
|
738 |
+
}
|
739 |
+
|
740 |
+
/**
|
741 |
+
* Returns the list of existing language terms.
|
742 |
+
* - Returns all terms, that are or not assigned to posts.
|
743 |
+
* - Terms are ordered by `term_group` and `term_id` (see `PLL_Model->filter_language_terms_orderby()`).
|
744 |
+
*
|
745 |
+
* @since 3.2.3
|
746 |
+
*
|
747 |
+
* @return array<WP_Term>
|
748 |
+
*/
|
749 |
+
protected function get_language_terms() {
|
750 |
+
add_filter( 'get_terms_orderby', array( $this, 'filter_language_terms_orderby' ), 10, 3 );
|
751 |
+
$post_languages = get_terms( array( 'taxonomy' => 'language', 'hide_empty' => false, 'orderby' => 'term_group' ) );
|
752 |
+
remove_filter( 'get_terms_orderby', array( $this, 'filter_language_terms_orderby' ) );
|
753 |
+
|
754 |
+
return empty( $post_languages ) || is_wp_error( $post_languages ) ? array() : $post_languages;
|
755 |
+
}
|
756 |
}
|
include/walker-dropdown.php
CHANGED
@@ -35,7 +35,7 @@ class PLL_Walker_Dropdown extends Walker {
|
|
35 |
$output .= sprintf(
|
36 |
"\t" . '<option value="%1$s"%2$s%3$s>%4$s</option>' . "\n",
|
37 |
'url' === $value_type ? esc_url( $element->$value_type ) : esc_attr( $element->$value_type ),
|
38 |
-
|
39 |
selected( isset( $args['selected'] ) && $args['selected'] === $element->$value_type, true, false ),
|
40 |
esc_html( $element->name )
|
41 |
);
|
35 |
$output .= sprintf(
|
36 |
"\t" . '<option value="%1$s"%2$s%3$s>%4$s</option>' . "\n",
|
37 |
'url' === $value_type ? esc_url( $element->$value_type ) : esc_attr( $element->$value_type ),
|
38 |
+
! empty( $element->locale ) ? sprintf( ' lang="%s"', esc_attr( $element->locale ) ) : '',
|
39 |
selected( isset( $args['selected'] ) && $args['selected'] === $element->$value_type, true, false ),
|
40 |
esc_html( $element->name )
|
41 |
);
|
polylang.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Polylang
|
11 |
* Plugin URI: https://polylang.pro
|
12 |
* Description: Adds multilingual capability to WordPress
|
13 |
-
* Version: 3.2.
|
14 |
* Requires at least: 5.6
|
15 |
* Requires PHP: 5.6
|
16 |
* Author: WP SYNTEX
|
@@ -53,7 +53,7 @@ if ( defined( 'POLYLANG_VERSION' ) ) {
|
|
53 |
}
|
54 |
} else {
|
55 |
// Go on loading the plugin
|
56 |
-
define( 'POLYLANG_VERSION', '3.2.
|
57 |
define( 'PLL_MIN_WP_VERSION', '5.6' );
|
58 |
define( 'PLL_MIN_PHP_VERSION', '5.6' );
|
59 |
|
10 |
* Plugin Name: Polylang
|
11 |
* Plugin URI: https://polylang.pro
|
12 |
* Description: Adds multilingual capability to WordPress
|
13 |
+
* Version: 3.2.3
|
14 |
* Requires at least: 5.6
|
15 |
* Requires PHP: 5.6
|
16 |
* Author: WP SYNTEX
|
53 |
}
|
54 |
} else {
|
55 |
// Go on loading the plugin
|
56 |
+
define( 'POLYLANG_VERSION', '3.2.3' );
|
57 |
define( 'PLL_MIN_WP_VERSION', '5.6' );
|
58 |
define( 'PLL_MIN_PHP_VERSION', '5.6' );
|
59 |
|
readme.txt
CHANGED
@@ -3,13 +3,13 @@ Contributors: Chouby, manooweb, raaaahman, marianne38, sebastienserre, greglone,
|
|
3 |
Donate link: https://polylang.pro
|
4 |
Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
|
5 |
Requires at least: 5.6
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 3.2.
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
12 |
-
Go multilingual in a simple and efficient way. Keep writing posts, creating categories and post tags as usual while defining the
|
13 |
|
14 |
== Description ==
|
15 |
|
@@ -17,43 +17,49 @@ With Polylang fully integrated to WordPress and using only its built-in core fea
|
|
17 |
|
18 |
= Features =
|
19 |
|
20 |
-
Depending on the type of site you have built or are planning to build, a combination of plugins from the list below might be of interest
|
|
|
21 |
|
22 |
### Polylang
|
23 |
|
24 |
Polylang and [Polylang Pro](https://polylang.pro) share the same core providing features such as:
|
|
|
25 |
* Translating posts, pages, media, categories, post tags, custom post types and taxonomies, RSS feeds; RTL scripts are supported.
|
26 |
* The language is either set by the language code in URL, or you can use a different sub-domain or domain per language.
|
27 |
* Automatic copy of categories, post tags and other metas when creating a new post or page translation.
|
28 |
* Translating menus and widgets.
|
29 |
* Customizable language switcher available as a widget or a navigation menu item.
|
|
|
30 |
|
31 |
### Polylang Pro
|
32 |
|
33 |
Helps optimizing the time spent translating your site with some very useful extra features such as:
|
|
|
34 |
* Better integration in the new Block Editor.
|
35 |
* Language switcher available as a block.
|
36 |
-
*
|
|
|
37 |
* Duplicate and/or synchronize content across post translations.
|
38 |
* Improved compatibilities with other plugins such as [ACF Pro](https://polylang.pro/doc/working-with-acf-pro/).
|
39 |
* Share the same URL slug for posts or terms across languages.
|
40 |
-
* [Translate
|
41 |
-
* **Access to a Premium Support for personalized assistance
|
42 |
|
43 |
### Polylang for WooCommerce
|
44 |
|
45 |
-
[Add-on](https://polylang.pro/downloads/polylang-for-woocommerce/) for the compatibility with WooCommerce
|
|
|
46 |
* Translating WooCommerce pages (shop, check-out, cart, my account), product categories and global attribute terms directly in the WooCommerce interface.
|
47 |
* Translating WooCommerce e-mails and sending them to customers in their language.
|
48 |
* Products metadata synchronization.
|
49 |
-
* Compatibility with the native WooCommerce CSV import & export
|
50 |
* Compatibility with popular plugins such as WooCommerce Subscriptions, Product Bundles, WooCommerce Bookings, Shipment tracking and more.
|
51 |
* Ability to use the WooCommerce REST API (available with Polylang Pro).
|
52 |
* **Access to a Premium Support for personalized assistance**
|
53 |
|
54 |
-
Neither of them will allow
|
55 |
|
56 |
-
|
57 |
|
58 |
= Credits =
|
59 |
|
@@ -73,16 +79,16 @@ Wherever third party code has been used, credit has been given in the code’s c
|
|
73 |
|
74 |
= Where to find help ? =
|
75 |
|
76 |
-
* First time users should read [Polylang - Getting started](https://polylang.pro/doc-category/getting-started/), which explains the basics
|
77 |
* Read the [documentation](https://polylang.pro/doc/). It includes a [FAQ](https://polylang.pro/doc-category/faq/) and the [documentation for developers](https://polylang.pro/doc-category/developers/).
|
78 |
-
* Search the [community support forum](https://wordpress.org/search/). You will probably find your
|
79 |
* Read the sticky posts in the [community support forum](http://wordpress.org/support/plugin/polylang).
|
80 |
* If you still have a problem, open a new thread in the [community support forum](http://wordpress.org/support/plugin/polylang).
|
81 |
-
* [Polylang Pro and Polylang for WooCommerce](https://polylang.pro) users have access to our helpdesk.
|
82 |
|
83 |
= Is Polylang compatible with WooCommerce? =
|
84 |
|
85 |
-
* You need [Polylang for WooCommerce](https://polylang.pro/downloads/polylang-for-woocommerce/),
|
86 |
|
87 |
= Do you need translation services? =
|
88 |
|
@@ -97,6 +103,16 @@ Wherever third party code has been used, credit has been given in the code’s c
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
= 3.2.2 (2022-04-25) =
|
101 |
|
102 |
* Pro: Fix redirect occuring for tags sharing the same slug as their translations
|
@@ -141,55 +157,4 @@ Wherever third party code has been used, credit has been given in the code’s c
|
|
141 |
* Fix a PHP Notice when adding a new language and Yoast SEO is active #979
|
142 |
* Fix a PHP warning in Yoast SEO compatibility #954
|
143 |
|
144 |
-
= 3.1.4 (2022-01-31) =
|
145 |
-
|
146 |
-
* Pro: Adapt duplication and synchronization of the gallery block refactored in WP 5.9
|
147 |
-
* Fix UI glitch in the classic editor custom fields form when changing a post language in WP 5.9 #970
|
148 |
-
|
149 |
-
= 3.1.3 (2021-12-14) =
|
150 |
-
|
151 |
-
* Fix user description escaping #934
|
152 |
-
* Fix dismissable notice when creating a term in WP 5.9 #936
|
153 |
-
* Fix empty search not handled correctly. Props Dominik Schilling #937
|
154 |
-
* Fix warning occurring when a 3rd party plugin attempts to register anything else than a string using the WPML API #942
|
155 |
-
* Fix Yoast SEO columns not corectly drawn when quick editing a post #943
|
156 |
-
|
157 |
-
= 3.1.2 (2021-10-11) =
|
158 |
-
|
159 |
-
* Pro: Fix parent page not filtered by language in the block editor since WP 5.6
|
160 |
-
* Pro: Fix XLIFF mime type for PHP 7.0 and PHP 7.1
|
161 |
-
* Fix settings page displaying the media modules whne no language are defined
|
162 |
-
* Enforce Yoast SEO to use dynamic permalinks #882
|
163 |
-
* Yoast SEO: Fix static front page and blog page breadcrumb
|
164 |
-
|
165 |
-
= 3.1.1 (2021-08-16) =
|
166 |
-
|
167 |
-
* Pro: Fix a fatal error with The Events Calendar
|
168 |
-
* Allow to remove the cookie with the pll_cookie_expiration filter #905
|
169 |
-
|
170 |
-
= 3.1 (2021-07-27) =
|
171 |
-
|
172 |
-
* Add compatibility with WordPress 5.8
|
173 |
-
* Raise Minimum WordPress version to 5.4
|
174 |
-
* Pro: Allow to filter blocks by language in the widget block editor
|
175 |
-
* Pro: Allow to export and import XLIFF files for string translations
|
176 |
-
* Pro: Add the language switcher in the navigation block (experimental)
|
177 |
-
* Pro: Replace dashicons by svg icons in the block editor
|
178 |
-
* Pro: The Events Calendar: Add compatibility with Views V2 (only for sites using only one domain)
|
179 |
-
* Pro: Fix + icon displayed in the block editor sidebar when the user cannot create a translation
|
180 |
-
* Add a warning section to the site health for posts and terms without languages #825
|
181 |
-
* Require the simplexml extension in the site health if a wpml-config.xml is found #827
|
182 |
-
* Remove the information about the WPML compabitility mode in settings #843
|
183 |
-
* The browser preferred language detection is now deactivated by default
|
184 |
-
* The media are now untranslated by default
|
185 |
-
* Highlight the language filter in the admin toolbar when it's active #821
|
186 |
-
* Allow to query comments in multiple languages (just as posts and terms) #840
|
187 |
-
* Don't disable the translation input field in the classic metabox #841 Props Onatcer
|
188 |
-
* Optimize all images including flags #848 Props lowwebtech
|
189 |
-
* Don't redirect if WordPress doesn't validate the redirect url to avoid redirects to /wp-admin/ #879
|
190 |
-
* Fix media appearing to have a language after the language is changed in the media library grid view #807
|
191 |
-
* Fix media not all deleted when bulk deleting from the grid view of the media library #830
|
192 |
-
* Fix when more than one language switcher are added to the same menu #853
|
193 |
-
* Fix PHP notice when adding a CPT archive link to a menu #868 Props davidwebca
|
194 |
-
|
195 |
See [changelog.txt](https://plugins.svn.wordpress.org/polylang/trunk/changelog.txt) for older changelog
|
3 |
Donate link: https://polylang.pro
|
4 |
Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
|
5 |
Requires at least: 5.6
|
6 |
+
Tested up to: 6.0
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 3.2.3
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
12 |
+
Go multilingual in a simple and efficient way. Keep writing posts, creating categories and post tags as usual while defining the languages all at once.
|
13 |
|
14 |
== Description ==
|
15 |
|
17 |
|
18 |
= Features =
|
19 |
|
20 |
+
Depending on the type of site you have built or are planning to build, a combination of plugins from the list below might be of interest.
|
21 |
+
All plugins include a wizard allowing to install them in just a few clicks.
|
22 |
|
23 |
### Polylang
|
24 |
|
25 |
Polylang and [Polylang Pro](https://polylang.pro) share the same core providing features such as:
|
26 |
+
|
27 |
* Translating posts, pages, media, categories, post tags, custom post types and taxonomies, RSS feeds; RTL scripts are supported.
|
28 |
* The language is either set by the language code in URL, or you can use a different sub-domain or domain per language.
|
29 |
* Automatic copy of categories, post tags and other metas when creating a new post or page translation.
|
30 |
* Translating menus and widgets.
|
31 |
* Customizable language switcher available as a widget or a navigation menu item.
|
32 |
+
* Compatibility with Yoast SEO
|
33 |
|
34 |
### Polylang Pro
|
35 |
|
36 |
Helps optimizing the time spent translating your site with some very useful extra features such as:
|
37 |
+
|
38 |
* Better integration in the new Block Editor.
|
39 |
* Language switcher available as a block.
|
40 |
+
* Language options available in the widget block editor.
|
41 |
+
* Template parts translatable in the Full Site Editing (FSE).
|
42 |
* Duplicate and/or synchronize content across post translations.
|
43 |
* Improved compatibilities with other plugins such as [ACF Pro](https://polylang.pro/doc/working-with-acf-pro/).
|
44 |
* Share the same URL slug for posts or terms across languages.
|
45 |
+
* [Translate URLs slugs](https://polylang.pro/doc/translating-urls-slugs/) for categories, author bases, custom post types and more...
|
46 |
+
* **Access to a Premium Support for personalized assistance.**
|
47 |
|
48 |
### Polylang for WooCommerce
|
49 |
|
50 |
+
[Add-on](https://polylang.pro/downloads/polylang-for-woocommerce/) for the compatibility with WooCommerce which provides features such as:
|
51 |
+
|
52 |
* Translating WooCommerce pages (shop, check-out, cart, my account), product categories and global attribute terms directly in the WooCommerce interface.
|
53 |
* Translating WooCommerce e-mails and sending them to customers in their language.
|
54 |
* Products metadata synchronization.
|
55 |
+
* Compatibility with the native WooCommerce CSV import & export tool.
|
56 |
* Compatibility with popular plugins such as WooCommerce Subscriptions, Product Bundles, WooCommerce Bookings, Shipment tracking and more.
|
57 |
* Ability to use the WooCommerce REST API (available with Polylang Pro).
|
58 |
* **Access to a Premium Support for personalized assistance**
|
59 |
|
60 |
+
Neither of them will allow to do automated translation. Nevertheless, can be isntalled alongside Polylang Pro or Polylang, a third party plugin such as [Lingotek Translation](https://wordpress.org/plugins/lingotek-translation/) which offers a complete translation management system and provides services such as a translation memory or semi-automated translation processes (e.g., machine translation => human translation => legal review).
|
61 |
|
62 |
+
Migrating from WPML is possible using the plugin [WPML to Polylang](https://wordpress.org/plugins/wpml-to-polylang/).
|
63 |
|
64 |
= Credits =
|
65 |
|
79 |
|
80 |
= Where to find help ? =
|
81 |
|
82 |
+
* First time users should read [Polylang - Getting started](https://polylang.pro/doc-category/getting-started/), which explains the basics and includes a lot of screenshots.
|
83 |
* Read the [documentation](https://polylang.pro/doc/). It includes a [FAQ](https://polylang.pro/doc-category/faq/) and the [documentation for developers](https://polylang.pro/doc-category/developers/).
|
84 |
+
* Search the [community support forum](https://wordpress.org/search/). You will probably find your answers here.
|
85 |
* Read the sticky posts in the [community support forum](http://wordpress.org/support/plugin/polylang).
|
86 |
* If you still have a problem, open a new thread in the [community support forum](http://wordpress.org/support/plugin/polylang).
|
87 |
+
* [Polylang Pro and Polylang for WooCommerce](https://polylang.pro) users have access to our premium support through helpdesk.
|
88 |
|
89 |
= Is Polylang compatible with WooCommerce? =
|
90 |
|
91 |
+
* You need [Polylang for WooCommerce](https://polylang.pro/downloads/polylang-for-woocommerce/), premium addon described above, which will make both plugins work together.
|
92 |
|
93 |
= Do you need translation services? =
|
94 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= 3.2.3 (2022-05-17) =
|
107 |
+
|
108 |
+
* Pro: Fix a fatal error when inserting a term
|
109 |
+
* Pro: Fix translation of the block cover when duplicating a post
|
110 |
+
* Pro: Fix a CSS issue in bulk tranlate form introduced by WP 6.0
|
111 |
+
* Pro: Fix a CSS issue in string import/export metaboxes.
|
112 |
+
* Prevent random languages order in WP 6.0 #1041
|
113 |
+
* Translate site title in retrieve password email #1042
|
114 |
+
* Fix 'lang' attribute in language widget dropdown #1039
|
115 |
+
|
116 |
= 3.2.2 (2022-04-25) =
|
117 |
|
118 |
* Pro: Fix redirect occuring for tags sharing the same slug as their translations
|
157 |
* Fix a PHP Notice when adding a new language and Yoast SEO is active #979
|
158 |
* Fix a PHP warning in Yoast SEO compatibility #954
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
See [changelog.txt](https://plugins.svn.wordpress.org/polylang/trunk/changelog.txt) for older changelog
|