Version Description
(2020-09-08) =
- Pro: Fix posts sharing the same slug displayed on the same page
- Fix: Don't use a javascript localized string removed in WP 5.5 #568
- Fix fatal error in site health when no language is defined #563
- Fix various issues with Yoast SEO 14.x #65, #503, #505
- Fix fatal error with MU Domain Mapping when saving domains in Polylang settings #569
Download this release
Release Info
Developer | Chouby |
Plugin | Polylang |
Version | 2.8.2 |
Comparing to | |
See all releases |
Code changes from version 2.8.1 to 2.8.2
- changelog.txt +67 -0
- integrations/domain-mapping/domain-mapping.php +5 -0
- integrations/wpseo/wpseo.php +32 -0
- js/admin.js +1 -1
- js/admin.min.js +1 -1
- js/classic-editor.js +9 -4
- js/nav-menu.js +4 -2
- js/post.js +4 -1
- js/term.js +8 -3
- js/widgets.js +2 -1
- modules/site-health/load.php +1 -1
- modules/wizard/js/languages-step.js +11 -5
- modules/wizard/wizard.php +32 -23
- polylang.php +2 -2
- readme.txt +9 -68
- settings/settings.php +1 -0
changelog.txt
CHANGED
@@ -2,6 +2,73 @@
|
|
2 |
|
3 |
This file contains only old changelog. See readme.txt for newer versions.
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
= 2.6.10 (2020-02-19) =
|
6 |
|
7 |
* Pro: Fix sticky posts not filtered in REST API (introduced in 2.6.9)
|
2 |
|
3 |
This file contains only old changelog. See readme.txt for newer versions.
|
4 |
|
5 |
+
= 2.7.4 (2020-06-29) =
|
6 |
+
|
7 |
+
* Pro: Allow using our /untranslated-posts REST endpoint for non-public post types
|
8 |
+
* Pro: Fix broken display in the block editor sidebar when a language has no flag
|
9 |
+
* Pro: Fix SSO breaking the preview on secondary domains
|
10 |
+
* Pro: Fix ACF translation option not working for term custom fields
|
11 |
+
* Pro: Fix a styling issue in the fields group list table in ACF 5.9
|
12 |
+
* Add Spanish from Puerto Rico to the predefined list of languages
|
13 |
+
|
14 |
+
= 2.7.3 (2020-05-26) =
|
15 |
+
|
16 |
+
* Security: Slash metas
|
17 |
+
* Pro: Fix categories not savedafter the language has been switched in the block editor
|
18 |
+
* Pro: Fix ACF fields stored as integers instead of strings
|
19 |
+
* Pro: Fix ACF untranslated posts or terms being copied when creating a new translation
|
20 |
+
* Pro: Fix PHP notice with ACF when a repeater or group is included in a flexible content
|
21 |
+
* Pro: Fix "DevTools failed to load SourceMap" warning in browser console
|
22 |
+
* Update plugin updater to 1.7.1
|
23 |
+
* Honor the filter "pll_the_language_link" when the language switcher displays a dropdown #506
|
24 |
+
* Fix "Something went wrong" message when quick editing untranslated post types #508
|
25 |
+
* Fix wpseo_opengraph deprecated warning #509
|
26 |
+
|
27 |
+
= 2.7.2 (2020-04-27) =
|
28 |
+
|
29 |
+
* Pro: Re-allow to modify the capability for strings translations
|
30 |
+
* Pro: Fix redirect for posts having the same slug as a media
|
31 |
+
* Pro: Fix PHP notice with ACF flexible content
|
32 |
+
* Pro: Fix a fatal error with InfiniteWP
|
33 |
+
* Update plugin updater to 1.7
|
34 |
+
* Fix font in setup wizard
|
35 |
+
|
36 |
+
= 2.7.1 (2020-04-09) =
|
37 |
+
|
38 |
+
* Pro: Fix untranslated post types filtered by the parameter in the REST API #493
|
39 |
+
* Fix fatal error when the function idn_to_ascii is not available
|
40 |
+
* Fix PHP warning warning when a 3rd party plugin declares options not stored in DB in wpml-config.xml #492
|
41 |
+
* Fix fatal error when a 3rd party plugin declares options stored as objects in wpml-config.xml #494
|
42 |
+
|
43 |
+
= 2.7 (2020-04-06) =
|
44 |
+
|
45 |
+
* Minimum WordPress version is now 4.9
|
46 |
+
* Pro: Strings translations can now be exported and imported (in PO format)
|
47 |
+
* Pro: Allow to decide individually which ACF fields to copy or synchronize
|
48 |
+
* Pro: Add action pll_inactive_language_requested
|
49 |
+
* Pro; Fix fatal error in The Events Calendar compatibility when no language is defined yet
|
50 |
+
* Pro: Fix bulk translate when a post has no language
|
51 |
+
* Pro: Fix reusable block saved without language
|
52 |
+
* Pro: Fix post requested by slug not filtered in REST API, when the slug is shared
|
53 |
+
* Add a setup wizard
|
54 |
+
* Add Swahili, Upper Sorbian, Sindhi and Spanish from Uruguay to the list of predefined languages
|
55 |
+
* Add flags in the predefined list of languages
|
56 |
+
* Allow to hide the metaboxes from the screen options
|
57 |
+
* The deletion of the plugin's data at uninstall is now controlled by a PHP constant instead of an option #456
|
58 |
+
* Add parent in ajax response when selecting a term in autocomplete field #328
|
59 |
+
* Add Vary: Accept-Language http header in home page redirect. Props @chesio #452
|
60 |
+
* Improve performance to register/unregister WPML strings
|
61 |
+
* Add support for the action wpml_switch_language
|
62 |
+
* Add post_status to the list of accepted args of pll_count_posts()
|
63 |
+
* Apply the filter pll_preferred_language in wp-login.php
|
64 |
+
* Use filtered wrappers to create meta when creating media translations #231
|
65 |
+
* Allow to translate the Twenty Seventeen header video Youtube url #460
|
66 |
+
* Notices are now dismissed per site instead of per user #478
|
67 |
+
* Fix terms not visible in the quick edit when only one language is defined and teh admin language filter is active
|
68 |
+
* Fix post state not displayed for translations of the privacy policy page #395
|
69 |
+
* Fix wildcards not correctly interpreted in wpml-config.xml
|
70 |
+
* Fix product categories with special characters duplicated when importing WooCommerce products #474
|
71 |
+
|
72 |
= 2.6.10 (2020-02-19) =
|
73 |
|
74 |
* Pro: Fix sticky posts not filtered in REST API (introduced in 2.6.9)
|
integrations/domain-mapping/domain-mapping.php
CHANGED
@@ -39,6 +39,11 @@ class PLL_Domain_Mapping {
|
|
39 |
|
40 |
// The language is set from the subdomain or domain name
|
41 |
if ( $options['force_lang'] > 1 ) {
|
|
|
|
|
|
|
|
|
|
|
42 |
// Don't redirect the main site
|
43 |
if ( is_main_site() ) {
|
44 |
return;
|
39 |
|
40 |
// The language is set from the subdomain or domain name
|
41 |
if ( $options['force_lang'] > 1 ) {
|
42 |
+
// Don't go further if we stopped loading the plugin early ( for example when deactivate-polylang=1 ).
|
43 |
+
if ( ! function_exists( 'PLL' ) ) {
|
44 |
+
return;
|
45 |
+
}
|
46 |
+
|
47 |
// Don't redirect the main site
|
48 |
if ( is_main_site() ) {
|
49 |
return;
|
integrations/wpseo/wpseo.php
CHANGED
@@ -44,6 +44,7 @@ class PLL_WPSEO {
|
|
44 |
add_filter( 'wpseo_frontend_presenters', array( $this, 'wpseo_frontend_presenters' ) );
|
45 |
}
|
46 |
add_filter( 'wpseo_canonical', array( $this, 'wpseo_canonical' ) );
|
|
|
47 |
} else {
|
48 |
add_action( 'admin_init', array( $this, 'wpseo_register_strings' ) );
|
49 |
|
@@ -392,6 +393,37 @@ class PLL_WPSEO {
|
|
392 |
return is_front_page( $url ) && get_option( 'permalink_structure' ) ? trailingslashit( $url ) : $url;
|
393 |
}
|
394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
/**
|
396 |
* Helper function to register strings for custom post types and custom taxonomies titles and meta descriptions
|
397 |
*
|
44 |
add_filter( 'wpseo_frontend_presenters', array( $this, 'wpseo_frontend_presenters' ) );
|
45 |
}
|
46 |
add_filter( 'wpseo_canonical', array( $this, 'wpseo_canonical' ) );
|
47 |
+
add_filter( 'wpseo_frontend_presentation', array( $this, 'frontend_presentation' ) );
|
48 |
} else {
|
49 |
add_action( 'admin_init', array( $this, 'wpseo_register_strings' ) );
|
50 |
|
393 |
return is_front_page( $url ) && get_option( 'permalink_structure' ) ? trailingslashit( $url ) : $url;
|
394 |
}
|
395 |
|
396 |
+
/**
|
397 |
+
* Fixes the links and strings stored in the indexable table since Yoast SEO 14.0
|
398 |
+
*
|
399 |
+
* @since 2.8.2
|
400 |
+
*
|
401 |
+
* @param object $presentation The indexable presentation.
|
402 |
+
* @return object
|
403 |
+
*/
|
404 |
+
public function frontend_presentation( $presentation ) {
|
405 |
+
if ( is_front_page() ) {
|
406 |
+
$presentation->model->permalink = pll_home_url();
|
407 |
+
}
|
408 |
+
|
409 |
+
if ( is_post_type_archive() ) {
|
410 |
+
$presentation->model->permalink = get_post_type_archive_link( get_post_type() );
|
411 |
+
}
|
412 |
+
|
413 |
+
$strings = array(
|
414 |
+
'title',
|
415 |
+
'description',
|
416 |
+
'breadcrumb_title',
|
417 |
+
);
|
418 |
+
|
419 |
+
foreach ( $strings as $string ) {
|
420 |
+
$presentation->model->$string = pll__( $presentation->model->$string );
|
421 |
+
}
|
422 |
+
|
423 |
+
return $presentation;
|
424 |
+
}
|
425 |
+
|
426 |
+
|
427 |
/**
|
428 |
* Helper function to register strings for custom post types and custom taxonomies titles and meta descriptions
|
429 |
*
|
js/admin.js
CHANGED
@@ -171,7 +171,7 @@ jQuery( document ).ready(
|
|
171 |
function() {
|
172 |
var $this = $( this ),
|
173 |
$button = $( '<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>' ),
|
174 |
-
btnText =
|
175 |
|
176 |
// Ensure plain text
|
177 |
$button.find( '.screen-reader-text' ).text( btnText );
|
171 |
function() {
|
172 |
var $this = $( this ),
|
173 |
$button = $( '<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>' ),
|
174 |
+
btnText = pll_dismiss_notice || '';
|
175 |
|
176 |
// Ensure plain text
|
177 |
$button.find( '.screen-reader-text' ).text( btnText );
|
js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(e){var t;e("table.languages").on({focusin:function(){clearTimeout(t),focusedRowActions=e(this).find(".row-actions"),e(".row-actions").not(this).removeClass("visible"),focusedRowActions.addClass("visible")},focusout:function(){t=setTimeout(function(){focusedRowActions.removeClass("visible")},30)}},"tr");var n=function(t,n){var s=e("<li>").text(n.label).prepend(e(n.element).data("flag-html"));return s.children("img").addClass("ui-icon"),s.appendTo(t)},s=function(t){var n=e(t).selectmenu("instance").buttonText;n.prepend(e(t).children(":selected").data("flag-html")),n.children("img").addClass("ui-icon")};e("#flag_list").on("selectmenucreate selectmenuselect",function(){s(this)}),e("#flag_list").on("selectmenuopen",function(){e(this).selectmenu("refresh").trigger("selectmenuselect")}),e("#flag_list").selectmenu({width:"100%"}),e("#flag_list").selectmenu("instance")._renderItem=n,e("#lang_list").on("selectmenucreate selectmenuselect",function(){s(this)}),e("#lang_list").selectmenu({width:"100%"}),e("#lang_list").selectmenu("instance")._renderItem=n,e("#add-lang #lang_list").on("selectmenuchange",function(){var t=e(this).val().split(":"),n=e("option:selected",this).text().split(" - ");e("#lang_slug").val(t[0]),e("#lang_locale").val(t[1]),e('input[name="rtl"]').val([t[2]]),e("#lang_name").val(n[0]),e("#flag_list").val(t[3]),e("#flag_list").selectmenu("refresh").trigger("selectmenuselect")}),e(".translation input").keypress(function(t){13===t.keyCode&&(t.preventDefault(),e("#submit").click())}),e("#the-list").on("click",".configure>a",function(){return e(".pll-configure").hide().prev().show(),e(this).closest("tr").hide().next().show(),!1}),e("#the-list").on("click",".cancel",function(){e(this).closest("tr").hide().prev().show()}),e("#the-list").on("click",".save",function(){var t=e(this).closest("tr"),n=t.attr("id").split("-"),s={action:"pll_save_options",pll_ajax_settings:!0,module:n[n.length-1],_pll_nonce:e("#_pll_nonce").val()};s=t.find(":input").serialize()+"&"+e.param(s),e.post(ajaxurl,s,function(n){var s=wpAjax.parseAjaxResponse(n,"ajax-response");e.each(s.responses,function(){switch(this.what){case"license-update":e("#pll-license-"+this.data).replaceWith(this.supplemental.html);break;case"success":t.hide().prev().show();case"error":e(".settings-error").remove(),e("h1").after(this.data),e(".notice.is-dismissible").each(function(){var t=e(this),n=e('<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>'),s=
|
1 |
+
jQuery(document).ready(function(e){var t;e("table.languages").on({focusin:function(){clearTimeout(t),focusedRowActions=e(this).find(".row-actions"),e(".row-actions").not(this).removeClass("visible"),focusedRowActions.addClass("visible")},focusout:function(){t=setTimeout(function(){focusedRowActions.removeClass("visible")},30)}},"tr");var n=function(t,n){var s=e("<li>").text(n.label).prepend(e(n.element).data("flag-html"));return s.children("img").addClass("ui-icon"),s.appendTo(t)},s=function(t){var n=e(t).selectmenu("instance").buttonText;n.prepend(e(t).children(":selected").data("flag-html")),n.children("img").addClass("ui-icon")};e("#flag_list").on("selectmenucreate selectmenuselect",function(){s(this)}),e("#flag_list").on("selectmenuopen",function(){e(this).selectmenu("refresh").trigger("selectmenuselect")}),e("#flag_list").selectmenu({width:"100%"}),e("#flag_list").selectmenu("instance")._renderItem=n,e("#lang_list").on("selectmenucreate selectmenuselect",function(){s(this)}),e("#lang_list").selectmenu({width:"100%"}),e("#lang_list").selectmenu("instance")._renderItem=n,e("#add-lang #lang_list").on("selectmenuchange",function(){var t=e(this).val().split(":"),n=e("option:selected",this).text().split(" - ");e("#lang_slug").val(t[0]),e("#lang_locale").val(t[1]),e('input[name="rtl"]').val([t[2]]),e("#lang_name").val(n[0]),e("#flag_list").val(t[3]),e("#flag_list").selectmenu("refresh").trigger("selectmenuselect")}),e(".translation input").keypress(function(t){13===t.keyCode&&(t.preventDefault(),e("#submit").click())}),e("#the-list").on("click",".configure>a",function(){return e(".pll-configure").hide().prev().show(),e(this).closest("tr").hide().next().show(),!1}),e("#the-list").on("click",".cancel",function(){e(this).closest("tr").hide().prev().show()}),e("#the-list").on("click",".save",function(){var t=e(this).closest("tr"),n=t.attr("id").split("-"),s={action:"pll_save_options",pll_ajax_settings:!0,module:n[n.length-1],_pll_nonce:e("#_pll_nonce").val()};s=t.find(":input").serialize()+"&"+e.param(s),e.post(ajaxurl,s,function(n){var s=wpAjax.parseAjaxResponse(n,"ajax-response");e.each(s.responses,function(){switch(this.what){case"license-update":e("#pll-license-"+this.data).replaceWith(this.supplemental.html);break;case"success":t.hide().prev().show();case"error":e(".settings-error").remove(),e("h1").after(this.data),e(".notice.is-dismissible").each(function(){var t=e(this),n=e('<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>'),s=pll_dismiss_notice||"";n.find(".screen-reader-text").text(s),t.append(n),n.on("click.wp-dismiss-notice",function(n){n.preventDefault(),t.fadeTo(100,0,function(){e(this).slideUp(100,function(){e(this).remove()})})})})}})})}),e(".pll-configure").keypress(function(t){13===t.keyCode&&(t.preventDefault(),e(this).find(".save").click()),27===t.keyCode&&(t.preventDefault(),e(this).find(".cancel").click())}),e("input[name='force_lang']").change(function(){function t(e,t){t?e.show():e.hide()}var n=e(this).val();t(e("#pll-domains-table"),3==n),t(e("#pll-hide-default"),3>n),t(e("#pll-rewrite"),2>n),t(e("#pll-redirect-lang"),2>n)}),e(".pll-deactivate-license").on("click",function(){var t={action:"pll_deactivate_license",pll_ajax_settings:!0,id:e(this).attr("id"),_pll_nonce:e("#_pll_nonce").val()};e.post(ajaxurl,t,function(t){e("#pll-license-"+t.id).replaceWith(t.html)})}),e(".if-js-closed").removeClass("if-js-closed").addClass("closed"),"undefined"!=typeof postboxes&&postboxes.add_postbox_toggles(pagenow)});
|
js/classic-editor.js
CHANGED
@@ -46,11 +46,13 @@
|
|
46 |
|
47 |
// add an if else condition to allow modifying the tags outputed when switching the language
|
48 |
if ( v = $( '#tagcloud-' + tax ).css( 'display' ) ) {
|
49 |
-
|
|
|
50 |
$( '#tagcloud-' + tax ).css( 'display', v );
|
51 |
}
|
52 |
else {
|
53 |
-
|
|
|
54 |
}
|
55 |
}
|
56 |
);
|
@@ -72,7 +74,8 @@ jQuery( document ).ready(
|
|
72 |
|
73 |
// add our hidden field in the new category form - for each hierarchical taxonomy
|
74 |
// to set the language when creating a new category
|
75 |
-
|
|
|
76 |
$( '<input />' ).attr( 'type', 'hidden' )
|
77 |
.attr( 'id', taxonomy + '-lang' )
|
78 |
.attr( 'name', 'term_lang_choice' )
|
@@ -118,7 +121,9 @@ jQuery( document ).ready(
|
|
118 |
$( '#' + tax + 'checklist' ).html( this.supplemental.all ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
|
119 |
// @see wp_popular_terms_checklist https://github.com/WordPress/WordPress/blob/5.2.2/wp-admin/includes/template.php#L236
|
120 |
$( '#' + tax + 'checklist-pop' ).html( this.supplemental.populars ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
|
121 |
-
|
|
|
|
|
122 |
$( '#' + tax + '-lang' ).val( $( '.post_lang_choice' ).val() ); // hidden field
|
123 |
break;
|
124 |
case 'pages': // parent dropdown list for pages
|
46 |
|
47 |
// add an if else condition to allow modifying the tags outputed when switching the language
|
48 |
if ( v = $( '#tagcloud-' + tax ).css( 'display' ) ) {
|
49 |
+
// See the comment above when r variable is created.
|
50 |
+
$( '#tagcloud-' + tax ).replaceWith( r ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith
|
51 |
$( '#tagcloud-' + tax ).css( 'display', v );
|
52 |
}
|
53 |
else {
|
54 |
+
// See the comment above when r variable is created.
|
55 |
+
$( '#' + id ).after( r ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.after
|
56 |
}
|
57 |
}
|
58 |
);
|
74 |
|
75 |
// add our hidden field in the new category form - for each hierarchical taxonomy
|
76 |
// to set the language when creating a new category
|
77 |
+
// html code inserted come from html code itself.
|
78 |
+
$( '#' + taxonomy + '-add-submit' ).before( // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.before
|
79 |
$( '<input />' ).attr( 'type', 'hidden' )
|
80 |
.attr( 'id', taxonomy + '-lang' )
|
81 |
.attr( 'name', 'term_lang_choice' )
|
121 |
$( '#' + tax + 'checklist' ).html( this.supplemental.all ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
|
122 |
// @see wp_popular_terms_checklist https://github.com/WordPress/WordPress/blob/5.2.2/wp-admin/includes/template.php#L236
|
123 |
$( '#' + tax + 'checklist-pop' ).html( this.supplemental.populars ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
|
124 |
+
// @see wp_dropdown_categories https://github.com/WordPress/WordPress/blob/5.5.1/wp-includes/category-template.php#L336
|
125 |
+
// which is called by PLL_Admin_Classic_Editor::post_lang_choice to generate supplemental.dropdown
|
126 |
+
$( '#new' + tax + '_parent' ).replaceWith( this.supplemental.dropdown ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith
|
127 |
$( '#' + tax + '-lang' ).val( $( '.post_lang_choice' ).val() ); // hidden field
|
128 |
break;
|
129 |
case 'pages': // parent dropdown list for pages
|
js/nav-menu.js
CHANGED
@@ -54,7 +54,8 @@ jQuery( document ).ready(
|
|
54 |
// add the fields
|
55 |
for ( var i = 0, idsLength = ids.length; i < idsLength; i++ ) {
|
56 |
p = $( '<p>' ).attr( 'class', 'description' );
|
57 |
-
|
|
|
58 |
// item is a number part of id of parent menu item built by WordPress
|
59 |
// pll_data is built server side with i18n strings without HTML
|
60 |
label = $( '<label>' ).attr( 'for', 'edit-menu-item-' + ids[ i ] + '-' + item ).text( ' ' + pll_data.strings[ ids[ i ] ] );
|
@@ -70,7 +71,8 @@ jQuery( document ).ready(
|
|
70 |
if ( ( typeof( pll_data.val[ item ] ) != 'undefined' && pll_data.val[ item ][ ids[ i ] ] == 1 ) || ( typeof( pll_data.val[ item ] ) == 'undefined' && ids[ i ] == 'show_names' ) ) { // show_names as default value
|
71 |
cb.prop( 'checked', true );
|
72 |
}
|
73 |
-
|
|
|
74 |
}
|
75 |
}
|
76 |
);
|
54 |
// add the fields
|
55 |
for ( var i = 0, idsLength = ids.length; i < idsLength; i++ ) {
|
56 |
p = $( '<p>' ).attr( 'class', 'description' );
|
57 |
+
// p is hardcoded just above by using attr method which is safe.
|
58 |
+
$( this ).prepend( p ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
|
59 |
// item is a number part of id of parent menu item built by WordPress
|
60 |
// pll_data is built server side with i18n strings without HTML
|
61 |
label = $( '<label>' ).attr( 'for', 'edit-menu-item-' + ids[ i ] + '-' + item ).text( ' ' + pll_data.strings[ ids[ i ] ] );
|
71 |
if ( ( typeof( pll_data.val[ item ] ) != 'undefined' && pll_data.val[ item ][ ids[ i ] ] == 1 ) || ( typeof( pll_data.val[ item ] ) == 'undefined' && ids[ i ] == 'show_names' ) ) { // show_names as default value
|
72 |
cb.prop( 'checked', true );
|
73 |
}
|
74 |
+
// See reasons above. Checkbox are totaly hardcoded here with safe value
|
75 |
+
label.prepend( cb ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
|
76 |
}
|
77 |
}
|
78 |
);
|
js/post.js
CHANGED
@@ -127,7 +127,10 @@
|
|
127 |
res.responses,
|
128 |
function() {
|
129 |
if ( 'row' == this.what ) {
|
130 |
-
|
|
|
|
|
|
|
131 |
}
|
132 |
}
|
133 |
);
|
127 |
res.responses,
|
128 |
function() {
|
129 |
if ( 'row' == this.what ) {
|
130 |
+
// data is built with a call to WP_Posts_List_Table::single_row method
|
131 |
+
// which uses internally other WordPress methods which escape correctly values.
|
132 |
+
// For Polylang language columns the HTML code is correctly escaped in PLL_Admin_Filters_Columns::post_column method.
|
133 |
+
$( "#post-" + this.supplemental.post_id ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith
|
134 |
}
|
135 |
}
|
136 |
);
|
js/term.js
CHANGED
@@ -66,7 +66,10 @@
|
|
66 |
res.responses,
|
67 |
function() {
|
68 |
if ( 'row' == this.what ) {
|
69 |
-
|
|
|
|
|
|
|
70 |
}
|
71 |
}
|
72 |
);
|
@@ -184,10 +187,12 @@ jQuery( document ).ready(
|
|
184 |
init_translations();
|
185 |
break;
|
186 |
case 'parent': // parent dropdown list for hierarchical taxonomies
|
187 |
-
|
|
|
188 |
break;
|
189 |
case 'tag_cloud': // popular items
|
190 |
-
|
|
|
191 |
break;
|
192 |
case 'flag': // flag in front of the select dropdown
|
193 |
// Data is built and come from server side and is well escaped when necessary
|
66 |
res.responses,
|
67 |
function() {
|
68 |
if ( 'row' == this.what ) {
|
69 |
+
// data is built with a call to WP_Terms_List_Table::single_row method
|
70 |
+
// which uses internally other WordPress methods which escape correctly values.
|
71 |
+
// For Polylang language columns the HTML code is correctly escaped in PLL_Admin_Filters_Columns::term_column method.
|
72 |
+
$( "#tag-" + this.supplemental.term_id ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith
|
73 |
}
|
74 |
}
|
75 |
);
|
187 |
init_translations();
|
188 |
break;
|
189 |
case 'parent': // parent dropdown list for hierarchical taxonomies
|
190 |
+
// data correctly escaped in PLL_Admin_Filters_Term::term_lang_choice method which uses wp_dropdown_categories function.
|
191 |
+
$( '#parent' ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith
|
192 |
break;
|
193 |
case 'tag_cloud': // popular items
|
194 |
+
// data correctly escaped in PLL_Admin_Filters_Term::term_lang_choice method which uses wp_tag_cloud and wp_generate_tag_cloud functions.
|
195 |
+
$( '.tagcloud' ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith
|
196 |
break;
|
197 |
case 'flag': // flag in front of the select dropdown
|
198 |
// Data is built and come from server side and is well escaped when necessary
|
js/widgets.js
CHANGED
@@ -35,7 +35,8 @@ jQuery(
|
|
35 |
current.html( icon ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
|
36 |
} else {
|
37 |
flag = $( '<span />' ).addClass( 'pll-lang' ).html( icon ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
|
38 |
-
|
|
|
39 |
}
|
40 |
} else {
|
41 |
$( '.pll-lang', title ).remove();
|
35 |
current.html( icon ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
|
36 |
} else {
|
37 |
flag = $( '<span />' ).addClass( 'pll-lang' ).html( icon ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
|
38 |
+
// See the comment above about the icon which is safe. So it is also safe to prepend flag which uses icon.
|
39 |
+
title.prepend( flag ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
|
40 |
}
|
41 |
} else {
|
42 |
$( '.pll-lang', title ).remove();
|
modules/site-health/load.php
CHANGED
@@ -9,6 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
exit; // Don't access directly.
|
10 |
};
|
11 |
|
12 |
-
if ( $polylang instanceof PLL_Admin ) {
|
13 |
$polylang->site_health = new PLL_Admin_Site_Health( $polylang );
|
14 |
}
|
9 |
exit; // Don't access directly.
|
10 |
};
|
11 |
|
12 |
+
if ( $polylang instanceof PLL_Admin && $polylang->model->get_languages_list() ) {
|
13 |
$polylang->site_health = new PLL_Admin_Site_Health( $polylang );
|
14 |
}
|
modules/wizard/js/languages-step.js
CHANGED
@@ -22,7 +22,8 @@ jQuery( document ).ready(
|
|
22 |
*/
|
23 |
function addLanguage( language ) {
|
24 |
// language properties come from the select dropdown which is built server side and well escaped.
|
25 |
-
|
|
|
26 |
var languageTrashIconHtml = $( '<td />' )
|
27 |
.append( // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append
|
28 |
$( '<span />' )
|
@@ -34,7 +35,8 @@ jQuery( document ).ready(
|
|
34 |
.text( pll_wizard_params.i18n_remove_language_icon )
|
35 |
)
|
36 |
);
|
37 |
-
|
|
|
38 |
var languageFieldHtml = $( '<input />' ).attr(
|
39 |
{
|
40 |
type: 'hidden',
|
@@ -82,7 +84,9 @@ jQuery( document ).ready(
|
|
82 |
*/
|
83 |
function showError( message ) {
|
84 |
messagesContainer.empty();
|
85 |
-
|
|
|
|
|
86 |
}
|
87 |
|
88 |
/**
|
@@ -246,7 +250,7 @@ jQuery( document ).ready(
|
|
246 |
}
|
247 |
}
|
248 |
|
249 |
-
// Initialize dialog box in the case a
|
250 |
dialog.dialog(
|
251 |
{
|
252 |
autoOpen: false,
|
@@ -268,7 +272,9 @@ jQuery( document ).ready(
|
|
268 |
}
|
269 |
// Display language name and flag information in dialog box.
|
270 |
$( this ).find( '#dialog-language' ).text( $( '#lang_list' ).children( ':selected' )[0].innerText );
|
271 |
-
|
|
|
|
|
272 |
},
|
273 |
buttons: [
|
274 |
{
|
22 |
*/
|
23 |
function addLanguage( language ) {
|
24 |
// language properties come from the select dropdown which is built server side and well escaped.
|
25 |
+
// see template view-wizard-step-languages.php.
|
26 |
+
var languageValueHtml = $( '<td />' ).text( language.text ).prepend( language.flagUrl ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
|
27 |
var languageTrashIconHtml = $( '<td />' )
|
28 |
.append( // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append
|
29 |
$( '<span />' )
|
35 |
.text( pll_wizard_params.i18n_remove_language_icon )
|
36 |
)
|
37 |
);
|
38 |
+
// see the comment and the harcoded code above. languageTrashIconHtml and languageValueHtml are safe.
|
39 |
+
var languageLineHtml = $( '<tr />' ).prepend( languageTrashIconHtml ).prepend( languageValueHtml ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
|
40 |
var languageFieldHtml = $( '<input />' ).attr(
|
41 |
{
|
42 |
type: 'hidden',
|
84 |
*/
|
85 |
function showError( message ) {
|
86 |
messagesContainer.empty();
|
87 |
+
// html is harcoded and use of jQuery text method which is safe to add message value.
|
88 |
+
// In addition message is i18n value which is initialized server side in PLL_Wizard::add_step_languages and correctly escaped.
|
89 |
+
messagesContainer.prepend( $( '<p/>' ).addClass( 'error' ).text( message ) ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
|
90 |
}
|
91 |
|
92 |
/**
|
250 |
}
|
251 |
}
|
252 |
|
253 |
+
// Initialize dialog box in the case a language is selected but not added in the list.
|
254 |
dialog.dialog(
|
255 |
{
|
256 |
autoOpen: false,
|
272 |
}
|
273 |
// Display language name and flag information in dialog box.
|
274 |
$( this ).find( '#dialog-language' ).text( $( '#lang_list' ).children( ':selected' )[0].innerText );
|
275 |
+
// language properties come from the select dropdown #lang_list which is built server side and well escaped.
|
276 |
+
// see template view-wizard-step-languages.php.
|
277 |
+
$( this ).find( '#dialog-language-flag' ).empty().prepend( $( '#lang_list' ).children( ':selected' ).data( 'flag-html' ) ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
|
278 |
},
|
279 |
buttons: [
|
280 |
{
|
modules/wizard/wizard.php
CHANGED
@@ -26,7 +26,13 @@ class PLL_Wizard {
|
|
26 |
/**
|
27 |
* List of steps
|
28 |
*
|
29 |
-
* @var array $steps
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
*/
|
31 |
protected $steps = array();
|
32 |
|
@@ -116,7 +122,7 @@ class PLL_Wizard {
|
|
116 |
* @since 2.7
|
117 |
*/
|
118 |
public function settings_tabs( $tabs ) {
|
119 |
-
$tabs['wizard'] =
|
120 |
return $tabs;
|
121 |
}
|
122 |
|
@@ -333,9 +339,10 @@ class PLL_Wizard {
|
|
333 |
add_action( 'wp_ajax_pll_deactivate_license', array( $this, 'deactivate_license' ) );
|
334 |
|
335 |
wp_enqueue_script( 'pll_admin', plugins_url( '/js/admin' . $this->get_suffix() . '.js', POLYLANG_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true );
|
|
|
336 |
if ( $this->is_licenses_step_displayable() ) {
|
337 |
$steps['licenses'] = array(
|
338 |
-
'name' =>
|
339 |
'view' => array( $this, 'display_step_licenses' ),
|
340 |
'handler' => array( $this, 'save_step_licenses' ),
|
341 |
'scripts' => array( 'pll_admin' ), // Polylang admin script used by deactivate license button.
|
@@ -422,32 +429,33 @@ class PLL_Wizard {
|
|
422 |
*/
|
423 |
public function add_step_languages( $steps ) {
|
424 |
wp_enqueue_script( 'pll-wizard-language-choice', plugins_url( '/js/admin' . $this->get_suffix() . '.js', POLYLANG_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true );
|
|
|
425 |
wp_register_script( 'pll-wizard-languages', plugins_url( '/modules/wizard/js/languages-step' . $this->get_suffix() . '.js', POLYLANG_FILE ), array( 'jquery', 'jquery-ui-dialog' ), POLYLANG_VERSION, true );
|
426 |
wp_localize_script(
|
427 |
'pll-wizard-languages',
|
428 |
'pll_wizard_params',
|
429 |
array(
|
430 |
-
'i18n_no_language_selected' =>
|
431 |
-
'i18n_language_already_added' =>
|
432 |
-
'i18n_no_language_added' =>
|
433 |
-
'i18n_add_language_needed' =>
|
434 |
-
'i18n_pll_add_language' =>
|
435 |
-
'i18n_pll_invalid_locale' =>
|
436 |
-
'i18n_pll_invalid_slug' =>
|
437 |
-
'i18n_pll_non_unique_slug' =>
|
438 |
-
'i18n_pll_invalid_name' =>
|
439 |
-
'i18n_pll_invalid_flag' =>
|
440 |
-
'i18n_dialog_title' =>
|
441 |
-
'i18n_dialog_yes_button' =>
|
442 |
-
'i18n_dialog_no_button' =>
|
443 |
-
'i18n_dialog_ignore_button' =>
|
444 |
-
'i18n_remove_language_icon' =>
|
445 |
)
|
446 |
);
|
447 |
wp_enqueue_script( 'pll-wizard-languages' );
|
448 |
wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/selectmenu' . $this->get_suffix() . '.css', POLYLANG_FILE ), array( 'dashicons', 'install', 'common', 'wp-jquery-ui-dialog' ), POLYLANG_VERSION );
|
449 |
$steps['languages'] = array(
|
450 |
-
'name' =>
|
451 |
'view' => array( $this, 'display_step_languages' ),
|
452 |
'handler' => array( $this, 'save_step_languages' ),
|
453 |
'scripts' => array( 'pll-wizard-languages', 'pll-wizard-language-choice' ),
|
@@ -553,7 +561,7 @@ class PLL_Wizard {
|
|
553 |
|
554 |
if ( $this->is_media_step_displayable( $languages ) ) {
|
555 |
$steps['media'] = array(
|
556 |
-
'name' =>
|
557 |
'view' => array( $this, 'display_step_media' ),
|
558 |
'handler' => array( $this, 'save_step_media' ),
|
559 |
'scripts' => array(),
|
@@ -600,9 +608,10 @@ class PLL_Wizard {
|
|
600 |
public function add_step_untranslated_contents( $steps ) {
|
601 |
if ( ! $this->model->get_languages_list() || $this->model->get_objects_with_no_lang( 1 ) ) {
|
602 |
wp_enqueue_script( 'pll-wizard-language-choice', plugins_url( '/js/admin' . $this->get_suffix() . '.js', POLYLANG_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true );
|
|
|
603 |
wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/selectmenu' . $this->get_suffix() . '.css', POLYLANG_FILE ), array( 'dashicons', 'install', 'common' ), POLYLANG_VERSION );
|
604 |
$steps['untranslated-contents'] = array(
|
605 |
-
'name' =>
|
606 |
'view' => array( $this, 'display_step_untranslated_contents' ),
|
607 |
'handler' => array( $this, 'save_step_untranslated_contents' ),
|
608 |
'scripts' => array( 'pll-wizard-language-choice' ),
|
@@ -665,7 +674,7 @@ class PLL_Wizard {
|
|
665 |
|
666 |
if ( $home_page_id > 0 && ( ! $languages || count( $languages ) === 1 || count( $translations ) !== count( $languages ) ) ) {
|
667 |
$steps['home-page'] = array(
|
668 |
-
'name' =>
|
669 |
'view' => array( $this, 'display_step_home_page' ),
|
670 |
'handler' => array( $this, 'save_step_home_page' ),
|
671 |
'scripts' => array(),
|
@@ -754,7 +763,7 @@ class PLL_Wizard {
|
|
754 |
*/
|
755 |
public function add_step_last( $steps ) {
|
756 |
$steps['last'] = array(
|
757 |
-
'name' =>
|
758 |
'view' => array( $this, 'display_step_last' ),
|
759 |
'handler' => array( $this, 'save_step_last' ),
|
760 |
'scripts' => array(),
|
26 |
/**
|
27 |
* List of steps
|
28 |
*
|
29 |
+
* @var array $steps {
|
30 |
+
* @type string $name i18n string which names the step.
|
31 |
+
* @type callable $view The callback function use to display the step content.
|
32 |
+
* @type callable $handler The callback function use to process the step after it is submitted.
|
33 |
+
* @type array $scripts List of scripts handle needed by the step.
|
34 |
+
* @type array $styles The list of styles handle needed by the step.
|
35 |
+
* }
|
36 |
*/
|
37 |
protected $steps = array();
|
38 |
|
122 |
* @since 2.7
|
123 |
*/
|
124 |
public function settings_tabs( $tabs ) {
|
125 |
+
$tabs['wizard'] = esc_html__( 'Setup', 'polylang' );
|
126 |
return $tabs;
|
127 |
}
|
128 |
|
339 |
add_action( 'wp_ajax_pll_deactivate_license', array( $this, 'deactivate_license' ) );
|
340 |
|
341 |
wp_enqueue_script( 'pll_admin', plugins_url( '/js/admin' . $this->get_suffix() . '.js', POLYLANG_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true );
|
342 |
+
wp_localize_script( 'pll_admin', 'pll_dismiss_notice', esc_html__( 'Dismiss this notice.', 'polylang' ) );
|
343 |
if ( $this->is_licenses_step_displayable() ) {
|
344 |
$steps['licenses'] = array(
|
345 |
+
'name' => esc_html__( 'Licenses', 'polylang' ),
|
346 |
'view' => array( $this, 'display_step_licenses' ),
|
347 |
'handler' => array( $this, 'save_step_licenses' ),
|
348 |
'scripts' => array( 'pll_admin' ), // Polylang admin script used by deactivate license button.
|
429 |
*/
|
430 |
public function add_step_languages( $steps ) {
|
431 |
wp_enqueue_script( 'pll-wizard-language-choice', plugins_url( '/js/admin' . $this->get_suffix() . '.js', POLYLANG_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true );
|
432 |
+
wp_localize_script( 'pll-wizard-language-choice', 'pll_dismiss_notice', esc_html__( 'Dismiss this notice.', 'polylang' ) );
|
433 |
wp_register_script( 'pll-wizard-languages', plugins_url( '/modules/wizard/js/languages-step' . $this->get_suffix() . '.js', POLYLANG_FILE ), array( 'jquery', 'jquery-ui-dialog' ), POLYLANG_VERSION, true );
|
434 |
wp_localize_script(
|
435 |
'pll-wizard-languages',
|
436 |
'pll_wizard_params',
|
437 |
array(
|
438 |
+
'i18n_no_language_selected' => esc_html__( 'You need to select a language to be added.', 'polylang' ),
|
439 |
+
'i18n_language_already_added' => esc_html__( 'You already added this language.', 'polylang' ),
|
440 |
+
'i18n_no_language_added' => esc_html__( 'You need to add at least one language.', 'polylang' ),
|
441 |
+
'i18n_add_language_needed' => esc_html__( 'You selected a language, however, to be able to continue, you need to add it.', 'polylang' ),
|
442 |
+
'i18n_pll_add_language' => esc_html__( 'Impossible to add the language.', 'polylang' ),
|
443 |
+
'i18n_pll_invalid_locale' => esc_html__( 'Enter a valid WordPress locale', 'polylang' ),
|
444 |
+
'i18n_pll_invalid_slug' => esc_html__( 'The language code contains invalid characters', 'polylang' ),
|
445 |
+
'i18n_pll_non_unique_slug' => esc_html__( 'The language code must be unique', 'polylang' ),
|
446 |
+
'i18n_pll_invalid_name' => esc_html__( 'The language must have a name', 'polylang' ),
|
447 |
+
'i18n_pll_invalid_flag' => esc_html__( 'The flag does not exist', 'polylang' ),
|
448 |
+
'i18n_dialog_title' => esc_html__( "A language wasn't added.", 'polylang' ),
|
449 |
+
'i18n_dialog_yes_button' => esc_html__( 'Yes', 'polylang' ),
|
450 |
+
'i18n_dialog_no_button' => esc_html__( 'No', 'polylang' ),
|
451 |
+
'i18n_dialog_ignore_button' => esc_html__( 'Ignore', 'polylang' ),
|
452 |
+
'i18n_remove_language_icon' => esc_html__( 'Remove this language', 'polylang' ),
|
453 |
)
|
454 |
);
|
455 |
wp_enqueue_script( 'pll-wizard-languages' );
|
456 |
wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/selectmenu' . $this->get_suffix() . '.css', POLYLANG_FILE ), array( 'dashicons', 'install', 'common', 'wp-jquery-ui-dialog' ), POLYLANG_VERSION );
|
457 |
$steps['languages'] = array(
|
458 |
+
'name' => esc_html__( 'Languages', 'polylang' ),
|
459 |
'view' => array( $this, 'display_step_languages' ),
|
460 |
'handler' => array( $this, 'save_step_languages' ),
|
461 |
'scripts' => array( 'pll-wizard-languages', 'pll-wizard-language-choice' ),
|
561 |
|
562 |
if ( $this->is_media_step_displayable( $languages ) ) {
|
563 |
$steps['media'] = array(
|
564 |
+
'name' => esc_html__( 'Media', 'polylang' ),
|
565 |
'view' => array( $this, 'display_step_media' ),
|
566 |
'handler' => array( $this, 'save_step_media' ),
|
567 |
'scripts' => array(),
|
608 |
public function add_step_untranslated_contents( $steps ) {
|
609 |
if ( ! $this->model->get_languages_list() || $this->model->get_objects_with_no_lang( 1 ) ) {
|
610 |
wp_enqueue_script( 'pll-wizard-language-choice', plugins_url( '/js/admin' . $this->get_suffix() . '.js', POLYLANG_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true );
|
611 |
+
wp_localize_script( 'pll-wizard-language-choice', 'pll_dismiss_notice', esc_html__( 'Dismiss this notice.', 'polylang' ) );
|
612 |
wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/selectmenu' . $this->get_suffix() . '.css', POLYLANG_FILE ), array( 'dashicons', 'install', 'common' ), POLYLANG_VERSION );
|
613 |
$steps['untranslated-contents'] = array(
|
614 |
+
'name' => esc_html__( 'Content', 'polylang' ),
|
615 |
'view' => array( $this, 'display_step_untranslated_contents' ),
|
616 |
'handler' => array( $this, 'save_step_untranslated_contents' ),
|
617 |
'scripts' => array( 'pll-wizard-language-choice' ),
|
674 |
|
675 |
if ( $home_page_id > 0 && ( ! $languages || count( $languages ) === 1 || count( $translations ) !== count( $languages ) ) ) {
|
676 |
$steps['home-page'] = array(
|
677 |
+
'name' => esc_html__( 'Homepage', 'polylang' ),
|
678 |
'view' => array( $this, 'display_step_home_page' ),
|
679 |
'handler' => array( $this, 'save_step_home_page' ),
|
680 |
'scripts' => array(),
|
763 |
*/
|
764 |
public function add_step_last( $steps ) {
|
765 |
$steps['last'] = array(
|
766 |
+
'name' => esc_html__( 'Ready!', 'polylang' ),
|
767 |
'view' => array( $this, 'display_step_last' ),
|
768 |
'handler' => array( $this, 'save_step_last' ),
|
769 |
'scripts' => array(),
|
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: 2.8.
|
14 |
* Requires at least: 4.9
|
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', '2.8.
|
57 |
define( 'PLL_MIN_WP_VERSION', '4.9' );
|
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: 2.8.2
|
14 |
* Requires at least: 4.9
|
15 |
* Requires PHP: 5.6
|
16 |
* Author: WP SYNTEX
|
53 |
}
|
54 |
} else {
|
55 |
// Go on loading the plugin
|
56 |
+
define( 'POLYLANG_VERSION', '2.8.2' );
|
57 |
define( 'PLL_MIN_WP_VERSION', '4.9' );
|
58 |
define( 'PLL_MIN_PHP_VERSION', '5.6' );
|
59 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: multilingual, bilingual, translate, translation, language, multilanguage,
|
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.8.
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -78,6 +78,14 @@ Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
= 2.8.1 (2020-08-25) =
|
82 |
|
83 |
* Pro: Fix fatal error with WP 4.9
|
@@ -109,71 +117,4 @@ Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-
|
|
109 |
* Fix the possibility to create 2 terms with the same name in the same language, without specifying the second slug.
|
110 |
* Fix sticky posts appearing 2 times in WP 5.5
|
111 |
|
112 |
-
= 2.7.4 (2020-06-29) =
|
113 |
-
|
114 |
-
* Pro: Allow using our /untranslated-posts REST endpoint for non-public post types
|
115 |
-
* Pro: Fix broken display in the block editor sidebar when a language has no flag
|
116 |
-
* Pro: Fix SSO breaking the preview on secondary domains
|
117 |
-
* Pro: Fix ACF translation option not working for term custom fields
|
118 |
-
* Pro: Fix a styling issue in the fields group list table in ACF 5.9
|
119 |
-
* Add Spanish from Puerto Rico to the predefined list of languages
|
120 |
-
|
121 |
-
= 2.7.3 (2020-05-26) =
|
122 |
-
|
123 |
-
* Security: Slash metas
|
124 |
-
* Pro: Fix categories not savedafter the language has been switched in the block editor
|
125 |
-
* Pro: Fix ACF fields stored as integers instead of strings
|
126 |
-
* Pro: Fix ACF untranslated posts or terms being copied when creating a new translation
|
127 |
-
* Pro: Fix PHP notice with ACF when a repeater or group is included in a flexible content
|
128 |
-
* Pro: Fix "DevTools failed to load SourceMap" warning in browser console
|
129 |
-
* Update plugin updater to 1.7.1
|
130 |
-
* Honor the filter "pll_the_language_link" when the language switcher displays a dropdown #506
|
131 |
-
* Fix "Something went wrong" message when quick editing untranslated post types #508
|
132 |
-
* Fix wpseo_opengraph deprecated warning #509
|
133 |
-
|
134 |
-
= 2.7.2 (2020-04-27) =
|
135 |
-
|
136 |
-
* Pro: Re-allow to modify the capability for strings translations
|
137 |
-
* Pro: Fix redirect for posts having the same slug as a media
|
138 |
-
* Pro: Fix PHP notice with ACF flexible content
|
139 |
-
* Pro: Fix a fatal error with InfiniteWP
|
140 |
-
* Update plugin updater to 1.7
|
141 |
-
* Fix font in setup wizard
|
142 |
-
|
143 |
-
= 2.7.1 (2020-04-09) =
|
144 |
-
|
145 |
-
* Pro: Fix untranslated post types filtered by the parameter in the REST API #493
|
146 |
-
* Fix fatal error when the function idn_to_ascii is not available
|
147 |
-
* Fix PHP warning warning when a 3rd party plugin declares options not stored in DB in wpml-config.xml #492
|
148 |
-
* Fix fatal error when a 3rd party plugin declares options stored as objects in wpml-config.xml #494
|
149 |
-
|
150 |
-
= 2.7 (2020-04-06) =
|
151 |
-
|
152 |
-
* Minimum WordPress version is now 4.9
|
153 |
-
* Pro: Strings translations can now be exported and imported (in PO format)
|
154 |
-
* Pro: Allow to decide individually which ACF fields to copy or synchronize
|
155 |
-
* Pro: Add action pll_inactive_language_requested
|
156 |
-
* Pro; Fix fatal error in The Events Calendar compatibility when no language is defined yet
|
157 |
-
* Pro: Fix bulk translate when a post has no language
|
158 |
-
* Pro: Fix reusable block saved without language
|
159 |
-
* Pro: Fix post requested by slug not filtered in REST API, when the slug is shared
|
160 |
-
* Add a setup wizard
|
161 |
-
* Add Swahili, Upper Sorbian, Sindhi and Spanish from Uruguay to the list of predefined languages
|
162 |
-
* Add flags in the predefined list of languages
|
163 |
-
* Allow to hide the metaboxes from the screen options
|
164 |
-
* The deletion of the plugin's data at uninstall is now controlled by a PHP constant instead of an option #456
|
165 |
-
* Add parent in ajax response when selecting a term in autocomplete field #328
|
166 |
-
* Add Vary: Accept-Language http header in home page redirect. Props @chesio #452
|
167 |
-
* Improve performance to register/unregister WPML strings
|
168 |
-
* Add support for the action wpml_switch_language
|
169 |
-
* Add post_status to the list of accepted args of pll_count_posts()
|
170 |
-
* Apply the filter pll_preferred_language in wp-login.php
|
171 |
-
* Use filtered wrappers to create meta when creating media translations #231
|
172 |
-
* Allow to translate the Twenty Seventeen header video Youtube url #460
|
173 |
-
* Notices are now dismissed per site instead of per user #478
|
174 |
-
* Fix terms not visible in the quick edit when only one language is defined and teh admin language filter is active
|
175 |
-
* Fix post state not displayed for translations of the privacy policy page #395
|
176 |
-
* Fix wildcards not correctly interpreted in wpml-config.xml
|
177 |
-
* Fix product categories with special characters duplicated when importing WooCommerce products #474
|
178 |
-
|
179 |
See [changelog.txt](https://plugins.svn.wordpress.org/polylang/trunk/changelog.txt) for older changelog
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.8.2
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 2.8.2 (2020-09-08) =
|
82 |
+
|
83 |
+
* Pro: Fix posts sharing the same slug displayed on the same page
|
84 |
+
* Fix: Don't use a javascript localized string removed in WP 5.5 #568
|
85 |
+
* Fix fatal error in site health when no language is defined #563
|
86 |
+
* Fix various issues with Yoast SEO 14.x #65, #503, #505
|
87 |
+
* Fix fatal error with MU Domain Mapping when saving domains in Polylang settings #569
|
88 |
+
|
89 |
= 2.8.1 (2020-08-25) =
|
90 |
|
91 |
* Pro: Fix fatal error with WP 4.9
|
117 |
* Fix the possibility to create 2 terms with the same name in the same language, without specifying the second slug.
|
118 |
* Fix sticky posts appearing 2 times in WP 5.5
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
See [changelog.txt](https://plugins.svn.wordpress.org/polylang/trunk/changelog.txt) for older changelog
|
settings/settings.php
CHANGED
@@ -325,6 +325,7 @@ class PLL_Settings extends PLL_Admin_Base {
|
|
325 |
|
326 |
wp_enqueue_script( 'pll_admin', plugins_url( '/js/admin' . $suffix . '.js', POLYLANG_FILE ), array( 'jquery', 'wp-ajax-response', 'postbox', 'jquery-ui-selectmenu' ), POLYLANG_VERSION );
|
327 |
wp_localize_script( 'pll_admin', 'pll_flag_base_url', plugins_url( '/flags/', POLYLANG_FILE ) );
|
|
|
328 |
|
329 |
wp_enqueue_style( 'pll_selectmenu', plugins_url( '/css/selectmenu' . $suffix . '.css', POLYLANG_FILE ), array(), POLYLANG_VERSION );
|
330 |
}
|
325 |
|
326 |
wp_enqueue_script( 'pll_admin', plugins_url( '/js/admin' . $suffix . '.js', POLYLANG_FILE ), array( 'jquery', 'wp-ajax-response', 'postbox', 'jquery-ui-selectmenu' ), POLYLANG_VERSION );
|
327 |
wp_localize_script( 'pll_admin', 'pll_flag_base_url', plugins_url( '/flags/', POLYLANG_FILE ) );
|
328 |
+
wp_localize_script( 'pll_admin', 'pll_dismiss_notice', esc_html__( 'Dismiss this notice.', 'polylang' ) );
|
329 |
|
330 |
wp_enqueue_style( 'pll_selectmenu', plugins_url( '/css/selectmenu' . $suffix . '.css', POLYLANG_FILE ), array(), POLYLANG_VERSION );
|
331 |
}
|