Version Description
(2016-11-15) =
- fix javascript error in some ajax requests
Download this release
Release Info
Developer | Chouby |
Plugin | Polylang |
Version | 2.0.9 |
Comparing to | |
See all releases |
Code changes from version 2.0.8 to 2.0.9
- js/post.js +1 -1
- js/post.min.js +1 -1
- polylang.php +2 -2
- readme.txt +5 -1
js/post.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
// valid for both tag metabox and quick edit
|
3 |
(function( $ ){
|
4 |
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
|
5 |
-
if ( ( -1 !== options.url.indexOf( 'action=ajax-tag-search' ) || -1 !== options.data.indexOf( 'action=ajax-tag-search' ) ) && ( ( lang = $( '.post_lang_choice' ).val() ) || ( lang = $( ':input[name="inline_lang_choice"]' ).val() ) ) ) {
|
6 |
options.data = 'lang=' + lang + '&' + options.data;
|
7 |
}
|
8 |
});
|
2 |
// valid for both tag metabox and quick edit
|
3 |
(function( $ ){
|
4 |
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
|
5 |
+
if ( 'undefined' !== typeof options.data && ( -1 !== options.url.indexOf( 'action=ajax-tag-search' ) || -1 !== options.data.indexOf( 'action=ajax-tag-search' ) ) && ( ( lang = $( '.post_lang_choice' ).val() ) || ( lang = $( ':input[name="inline_lang_choice"]' ).val() ) ) ) {
|
6 |
options.data = 'lang=' + lang + '&' + options.data;
|
7 |
}
|
8 |
});
|
js/post.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a){a.ajaxPrefilter(function(t){
|
1 |
+
!function(a){a.ajaxPrefilter(function(t){"undefined"==typeof t.data||-1===t.url.indexOf("action=ajax-tag-search")&&-1===t.data.indexOf("action=ajax-tag-search")||!(lang=a(".post_lang_choice").val())&&!(lang=a(':input[name="inline_lang_choice"]').val())||(t.data="lang="+lang+"&"+t.data)})}(jQuery),function(a){tagBox.get=function(t){var n=t.substr(t.indexOf("-")+1),e={action:"get-tagcloud",lang:a(".post_lang_choice").val(),tax:n};a.post(ajaxurl,e,function(e,i){0!=e&&"success"==i||(e=wpAjax.broken),e=a('<p id="tagcloud-'+n+'" class="the-tagcloud">'+e+"</p>"),a("a",e).click(function(){return tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this),!1}),(v=a(".the-tagcloud").css("display"))?(a(".the-tagcloud").replaceWith(e),a(".the-tagcloud").css("display",v)):a("#"+t).after(e)})}}(jQuery),function(a){a(document).bind("DOMNodeInserted",function(t){function n(t){"undefined"!=typeof pll_term_languages&&a.each(pll_term_languages,function(n,e){a.each(e,function(e,i){a.each(i,function(i){id="#"+e+"-"+pll_term_languages[n][e][i],t==n?a(id).show():a(id).hide()})})})}function e(t){"undefined"!=typeof pll_page_languages&&a.each(pll_page_languages,function(n,e){a.each(e,function(e){v=a('#post_parent option[value="'+pll_page_languages[n][e]+'"]'),t==n?v.show():v.hide()})})}var i=a(t.target);if("inline-edit"==i.attr("id")){var l=i.prev().attr("id").replace("post-","");if(l>0){var s=i.find(':input[name="inline_lang_choice"]'),o=a("#lang_"+l).html();s.val(o),n(o),e(o),s.change(function(){n(a(this).val()),e(a(this).val())})}}})}(jQuery),function(a){a(document).ajaxSuccess(function(t,n,e){function i(t){var n=new Array;a(".translation_"+t).each(function(){n.push(a(this).parent().parent().attr("id").substring(5))});var e={action:"pll_update_post_rows",post_id:t,translations:n.join(","),post_type:a("input[name='post_type']").val(),screen:a("input[name='screen']").val(),_pll_nonce:a("input[name='_inline_edit']").val()};a.post(ajaxurl,e,function(t){if(t){var n=wpAjax.parseAjaxResponse(t,"ajax-response");a.each(n.responses,function(){"row"==this.what&&a("#post-"+this.supplemental.post_id).replaceWith(this.data)})}})}var l=wpAjax.unserialize(e.data);"undefined"!=typeof l.action&&"inline-save"==l.action&&i(l.post_ID)})}(jQuery),jQuery(document).ready(function(a){function t(){a(".tr_lang").each(function(){var t=a(this).attr("id").substring(8),n=a(this).parent().siblings(".pll-edit-column");a(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_posts_not_translated&post_language="+a(".post_lang_choice").val()+"&translation_language="+t+"&post_type="+a("#post_type").val()+"&_pll_nonce="+a("#_pll_nonce").val(),select:function(e,i){a("#htr_lang_"+t).val(i.item.id),n.html(i.item.link)}}),a(this).blur(function(){a(this).val()||(a("#htr_lang_"+t).val(0),n.html(n.siblings(".hidden").children().clone()))})})}var n=new Array;a(".categorydiv").each(function(){var t,e,i=a(this).attr("id");t=i.split("-"),t.shift(),e=t.join("-"),n.push(e),a("#"+e+"-add-submit").before(a("<input />").attr("type","hidden").attr("id",e+"-lang").attr("name","term_lang_choice").attr("value",a(".post_lang_choice").val()))}),a(".post_lang_choice").change(function(){var e={action:"post_lang_choice",lang:a(this).val(),post_type:a("#post_type").val(),taxonomies:n,post_id:a("#post_ID").val(),_pll_nonce:a("#_pll_nonce").val()};a.post(ajaxurl,e,function(n){var e=wpAjax.parseAjaxResponse(n,"ajax-response");a.each(e.responses,function(){switch(this.what){case"translations":a(".translations").html(this.data),t();break;case"taxonomy":var n=this.data;a("#"+n+"checklist").html(this.supplemental.all),a("#"+n+"checklist-pop").html(this.supplemental.populars),a("#new"+n+"_parent").replaceWith(this.supplemental.dropdown),a("#"+n+"-lang").val(a(".post_lang_choice").val());break;case"pages":a("#parent_id").html(this.data);break;case"flag":a(".pll-select-flag").html(this.data);break;case"permalink":var e=a("#edit-slug-box");"-1"!=this.data&&e.children().length&&e.html(this.data)}}),a(".tagcloud-link").each(function(){var t=a(this).attr("id");tagBox.get(t)})})}),t()});
|
polylang.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Polylang
|
5 |
Plugin URI: https://polylang.pro
|
6 |
-
Version: 2.0.
|
7 |
Author: Frédéric Demarle
|
8 |
Author uri: https://polylang.pro
|
9 |
Description: Adds multilingual capability to WordPress
|
@@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
35 |
exit; // don't access directly
|
36 |
};
|
37 |
|
38 |
-
define( 'POLYLANG_VERSION', '2.0.
|
39 |
define( 'PLL_MIN_WP_VERSION', '4.0' );
|
40 |
|
41 |
define( 'POLYLANG_FILE', __FILE__ ); // this file
|
3 |
/*
|
4 |
Plugin Name: Polylang
|
5 |
Plugin URI: https://polylang.pro
|
6 |
+
Version: 2.0.9
|
7 |
Author: Frédéric Demarle
|
8 |
Author uri: https://polylang.pro
|
9 |
Description: Adds multilingual capability to WordPress
|
35 |
exit; // don't access directly
|
36 |
};
|
37 |
|
38 |
+
define( 'POLYLANG_VERSION', '2.0.9' );
|
39 |
define( 'PLL_MIN_WP_VERSION', '4.0' );
|
40 |
|
41 |
define( 'POLYLANG_FILE', __FILE__ ); // this file
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://polylang.pro
|
|
4 |
Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Making WordPress multilingual
|
@@ -77,6 +77,10 @@ Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
80 |
= 2.0.8 (2016-11-14) =
|
81 |
|
82 |
* Disable admin language feature in WP 4.7+
|
4 |
Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.0.9
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Making WordPress multilingual
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 2.0.9 (2016-11-15) =
|
81 |
+
|
82 |
+
* fix javascript error in some ajax requests
|
83 |
+
|
84 |
= 2.0.8 (2016-11-14) =
|
85 |
|
86 |
* Disable admin language feature in WP 4.7+
|