Weglot Translate – Translate your WP website - Version 3.8.1

Version Description

(18/10/2022) = * Bug: Default is_rtl value for custom_languages * Bug: Update render button for gutenberg editor * Bug: Improve UI for adding excluded block * Add: Update assets for wordpress.org

Download this release

Release Info

Developer remyb92
Plugin Icon 128x128 Weglot Translate – Translate your WP website
Version 3.8.1
Comparing to
See all releases

Code changes from version 3.8 to 3.8.1

app/javascripts/settings/admin-exclusion.js CHANGED
@@ -11,16 +11,50 @@ const init_admin_exclusion = function () {
11
  }
12
 
13
  if (document.querySelector("#js-add-exclude-block")) {
 
 
 
 
 
 
 
 
 
 
 
 
14
  document
15
  .querySelector("#js-add-exclude-block")
16
  .addEventListener("click", (e) => {
 
 
 
 
 
 
 
17
  e.preventDefault()
18
- parent_exclude_block_append.insertAdjacentHTML("beforeend", template_add_exclude_block.innerHTML);
19
- document
20
- .querySelector(
21
- "#container-exclude_blocks .item-exclude:last-child .js-btn-remove-exclude"
22
- )
23
- .addEventListener("click", removeLine);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  });
25
  }
26
 
11
  }
12
 
13
  if (document.querySelector("#js-add-exclude-block")) {
14
+
15
+ const input_exclude_blocks = document.querySelectorAll('#container-exclude_blocks input')
16
+ input_exclude_blocks.forEach((el) => {
17
+ el.addEventListener('keypress', function (e) {
18
+ if (e.keyCode === 13 || e.which === 13) {
19
+ e.preventDefault();
20
+ return false;
21
+ }
22
+ });
23
+ })
24
+ document.querySelectorAll('#container-exclude_blocks input')
25
+
26
  document
27
  .querySelector("#js-add-exclude-block")
28
  .addEventListener("click", (e) => {
29
+ let available_input = true
30
+ const input_exclude_blocks = document.querySelectorAll('#container-exclude_blocks input')
31
+ input_exclude_blocks.forEach((el) => {
32
+ if (el.value.length === 0) {
33
+ available_input = false
34
+ }
35
+ })
36
  e.preventDefault()
37
+ if (available_input === true) {
38
+ document.querySelector("#js-add-exclude-block").classList.add("disable-btn");
39
+ parent_exclude_block_append.insertAdjacentHTML("beforeend", template_add_exclude_block.innerHTML);
40
+ document
41
+ .querySelector(
42
+ "#container-exclude_blocks .item-exclude:last-child .js-btn-remove-exclude"
43
+ )
44
+ .addEventListener("click", removeLine);
45
+
46
+ document.querySelectorAll('#container-exclude_blocks input').forEach((el) => {
47
+ el.addEventListener('keypress', function (e) {
48
+ if (e.keyCode === 13 || e.which === 13) {
49
+ e.preventDefault();
50
+ return false;
51
+ } else {
52
+ document.querySelector("#js-add-exclude-block").classList.remove("disable-btn");
53
+ }
54
+ });
55
+ })
56
+ }
57
+
58
  });
59
  }
60
 
app/styles/admin.scss CHANGED
@@ -78,6 +78,11 @@ $wp-color-green: #46b450; // RGB(70, 180, 80)
78
  border-radius: 4px;
79
  border: 1px solid #7e8993;
80
  line-height: 1.4em;
 
 
 
 
 
81
  }
82
 
83
  &.btn-primary {
78
  border-radius: 4px;
79
  border: 1px solid #7e8993;
80
  line-height: 1.4em;
81
+
82
+ &.disable-btn{
83
+ background: #eaeaea;
84
+ opacity: 0.8;
85
+ }
86
  }
87
 
88
  &.btn-primary {
changelog.md CHANGED
@@ -3,6 +3,17 @@
3
 
4
  # Change Log
5
 
 
 
 
 
 
 
 
 
 
 
 
6
  ##3.7.4 (19/09/2022) =
7
  * Bugfix: Update CA Root Certificates from Mozilla
8
 
3
 
4
  # Change Log
5
 
6
+ ##3.8 (11/10/2022) =
7
+ * Add: Add ajax checker for woocommerce variations cart popin
8
+ * Add: Rework switcher. Generate it direclty on render method
9
+ * Add: Add vary header accept language on redirect
10
+ * Bug: Fix rtl issue
11
+ * Bug: Add missing ; on pageviews script
12
+ * Bug: Send code lang instead of name for wp search query
13
+ * Bug: Don't translate pdf on original language (woocommerce PDF invoice plugin)
14
+ * Bug: Prevent add twice weglot_language post meta on woocommerce order
15
+ * Bug: Prevent block translate if ajax referer are not exclude
16
+
17
  ##3.7.4 (19/09/2022) =
18
  * Bugfix: Update CA Root Certificates from Mozilla
19
 
dist/admin-js.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function o(a){if(t[a])return t[a].exports;var l=t[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,o),l.l=!0,l.exports}o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)o.d(a,l,function(t){return e[t]}.bind(null,l));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/",o(o.s=4)}([,function(e,t){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var a=arguments[1],l=0;l<o;){var n=t[l];if(e.call(a,n,l,t))return n;l++}},configurable:!0,writable:!0})},function(e,t){Array.prototype.filter||(Array.prototype.filter=function(e,t){"use strict";if("Function"!=typeof e&&"function"!=typeof e||!this)throw new TypeError;var o=this.length>>>0,a=new Array(o),l=this,n=0,r=-1;if(void 0===t)for(;++r!==o;)r in this&&e(l[r],r,l)&&(a[n++]=l[r]);else for(;++r!==o;)r in this&&e.call(t,l[r],r,l)&&(a[n++]=l[r]);return a.length=n,a})},,function(e,t,o){"use strict";o.r(t);var a=function(){const e=jQuery;let t;const o=()=>{let o=e("#original_language").val();e("#original_language").on("change",(function(a){const l=o,n=o;o=a.target.value,t[0].selectize.removeOption(o);const r=weglot_languages.available.find(e=>e.internal_code===n),s=weglot_languages.available.find(e=>e.internal_code===o);t[0].selectize.addOption(r);const i=e("#is_fullname").is(":checked");let c="";e("#with_name").is(":checked")&&(c=i?s.local:s.internal_code.toUpperCase()),e(".wgcurrent.wg-li").removeClass(l).addClass(o).attr("data-code-language",o).find("span").text(c)})),t=e(".weglot-select-destination").selectize({delimiter:"|",persist:!1,valueField:"internal_code",labelField:"local",searchField:["internal_code","english","local"],sortField:[{field:"english",direction:"asc"}],maxItems:weglot_languages.limit,plugins:["remove_button"],options:weglot_languages.available.filter(e=>e.internal_code!==weglot_languages.original),render:{option:function(e,t){return`<div class="weglot__choice__language"><span class="weglot__choice__language--english">${t(e.english)}</span><span class="weglot__choice__language--local">${t(e.local)}[${t(e.external_code)}]</span></div>`}}}).on("change",o=>{const a=t[0].selectize.getValue(),l=e("#li-button-tpl");if(0===l.length)return;const n=e("#is_fullname").is(":checked"),r=e("#with_name").is(":checked"),s=e("#with_flags").is(":checked");let i="";s&&(i="weglot-flags");let c="";var g=e("label.weglot-flags").attr("class").split(/\s+/);e.each(g,(function(e,t){if(1==t.includes("flag-"))return i+=" "+t,!1})),a.forEach(e=>{const t=weglot_languages.available.find(t=>t.internal_code===e);let o="";r&&(o=n?t.local:e.toUpperCase()),c+=l.html().replace("{LABEL_LANGUAGE}",o).replace(new RegExp("{CODE_LANGUAGE}","g"),e).replace("{CLASSES}",i)}),e(".country-selector ul").html(c)}),window.addEventListener("weglotCheckApi",e=>{t[0].selectize.settings.maxItems=weglot_languages.limit})};document.addEventListener("DOMContentLoaded",()=>{o()})};var l=function(){const e=jQuery;document.addEventListener("DOMContentLoaded",()=>{e("#weglot-box-first-settings .weglot-btn-close").on("click",(function(t){t.preventDefault(),e("#weglot-box-first-settings").hide()}))})};var n=function(){const e=()=>{document.querySelector("#tpl-exclusion-url");const e=document.querySelector("#tpl-exclusion-block"),t=document.querySelector("#container-exclude_blocks");function o(e){e.preventDefault(),this.parentNode.remove()}document.querySelector("#js-add-exclude-block")&&document.querySelector("#js-add-exclude-block").addEventListener("click",a=>{a.preventDefault(),t.insertAdjacentHTML("beforeend",e.innerHTML),document.querySelector("#container-exclude_blocks .item-exclude:last-child .js-btn-remove-exclude").addEventListener("click",o)});document.querySelectorAll(".js-btn-remove").forEach(e=>{e.addEventListener("click",o)})};document.addEventListener("DOMContentLoaded",()=>{e()})};var r=function(){const e=jQuery,t=()=>{let t=e("#type_flags option:selected").data("value"),o=[];o.push(e(".country-selector label").data("code-language")),e(".country-selector li").each((t,a)=>{o.push(e(a).data("code-language"))});const a=weglot_languages.available.filter(e=>o.indexOf(e.external_code)>=0);e("#weglot-css-inline").text(weglot_css.inline),e("#is_dropdown").on("change",(function(){e(".country-selector").toggleClass("weglot-inline"),e(".country-selector").toggleClass("weglot-dropdown")})),e("#with_flags").on("change",(function(){e(".country-selector label, .country-selector li").toggleClass("weglot-flags")})),e("#type_flags").on("change",(function(o){e(".country-selector label, .country-selector li").removeClass("flag-"+t);const a=e(":selected",this).data("value");e(".country-selector label, .country-selector li").addClass("flag-"+a),t=a}));const l=()=>{const t=a.find(t=>t.external_code===e(".country-selector label").data("code-language")),o=e("#is_fullname").is(":checked"),l=o?t.local:t.internal_code.toUpperCase();e(".country-selector label a, .country-selector label span").text(l),e(".country-selector li").each((t,l)=>{const n=a.find(t=>t.internal_code===e(l).data("code-language")),r=o?n.local:n.internal_code.toUpperCase();e(l).find("a").text(r)})};e("#with_name").on("change",(function(t){t.target.checked?l():(e(".country-selector label a, .country-selector label span").text(""),e(".country-selector li a, .country-selector li span").each((t,o)=>{e(o).text("")}))})),e("#is_fullname").on("change",(function(t){if(e("#with_name").is(":checked"))if(t.target.checked)l();else{const t=a.find(t=>t.internal_code===e(".country-selector label").data("code-language"));e(".country-selector label a, .country-selector label span").text(t.internal_code.toUpperCase()),e(".country-selector li").each((t,o)=>{const l=a.find(t=>t.internal_code===e(o).data("code-language"));e(o).find("a").text(l.internal_code.toUpperCase()),e(o).find("span").text(l.internal_code.toUpperCase())})}})),e("#override_css").on("keyup",(function(t){e("#weglot-css-inline").text(t.target.value)}))};document.addEventListener("DOMContentLoaded",()=>{0!==e(".weglot-preview").length&&t()})};var s=function(){const e=jQuery,t=()=>{e("#api_key_private").blur((function(){var t=e(this).val();if(0===t.length)return e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-nokkey"></span>'),void e("#wrap-weglot #submit").prop("disabled",!0);function o(){e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-nokkey"></span><p class="weglot-keyres">Make sure you enter a valid Weglot API key. If the key is still not validating, you can contact your host provider and ask if it\'s possible to whitelist api.weglot.com and weglot.com</p>'),e("#wrap-weglot #submit").prop("disabled",!0)}e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-ckeckkey"></span>'),e.ajax({method:"POST",url:ajaxurl,data:{action:"get_user_info",api_key:t},success:({data:t,success:a})=>{e(".weglot-keyres").remove(),a?function(t){e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-okkey"></span>'),e("#wrap-weglot #submit").prop("disabled",!1);const o=new CustomEvent("weglotCheckApi",{detail:t});window.dispatchEvent(o)}(t):o()}}).fail((function(){o()}))})),e(".toplevel_page_weglot-settings form").submit((function(t){e("#wrap-weglot #submit").prop("disabled",!0)}))};document.addEventListener("DOMContentLoaded",()=>{t()})};var i=function(){jQuery;document.addEventListener("DOMContentLoaded",()=>{jQuery(document).ready((function(e){wp.codeEditor.initialize(e("#override_css"),cm_settings)}))})};var c=function(){const e=jQuery;"undefined"!=typeof weglot_css&&e("#weglot-css-flag-css").text(weglot_css.flag_css);const t=()=>{e(".flag-style-openclose").on("click",(function(){e(".flag-style-wrapper").toggle()})),e(".old-flag-style").on("click",(function(){e(".old-flag-wrapper").toggle()})),e("select.flag-en-type, select.flag-es-type, select.flag-pt-type, select.flag-fr-type, select.flag-ar-type, select.flag-tw-type, select.flag-zh-type").on("change",(function(){!function(){var t=new Array,o=new Array,a=new Array,l=new Array,n=new Array,r=new Array,s=new Array;t[1]=[3570,7841,48,2712],t[2]=[3720,449,3048,4440],t[3]=[3840,1281,2712,4224],t[4]=[3240,5217,1224,2112],t[5]=[4050,3585,1944,2496],t[6]=[2340,3457,2016,2016],o[1]=[4320,4641,3144,3552],o[2]=[3750,353,2880,4656],o[3]=[4200,1601,2568,3192],o[4]=[3990,5793,1032,2232],o[5]=[5460,897,4104,3120],o[6]=[3810,7905,216,3888],o[7]=[3630,8065,192,2376],o[8]=[3780,1473,2496,4104],o[9]=[6120,2145,4680,2568],o[10]=[4440,3009,3240,1176],o[11]=[5280,1825,3936,2976],o[12]=[4770,2081,3624,1008],o[13]=[4080,3201,2160,2544],o[14]=[4590,5761,3432,624],o[15]=[4350,2209,3360,2688],o[16]=[5610,5249,3168,528],o[17]=[5070,1729,3792,2952],o[18]=[6870,5953,96,3408],o[19]=[4020,5697,1056,1224],a[1]=[2760,736,2856,4416],a[2]=[3840,1280,2712,4224],a[3]=[5700,7201,5016,2400],a[4]=[2220,4160,1632,1944],l[1]=[1830,129,3096,5664],l[2]=[5100,2177,3840,2904],l[3]=[4890,3425,3648,2136],l[4]=[1320,3681,1896,4080],l[5]=[1260,3841,1824,1200],l[6]=[1020,3969,1608,312],l[7]=[4800,4065,3600,72],l[8]=[4710,4865,3504,480],l[9]=[6720,5984,5112,3792],l[10]=[4500,7233,3288,1800],l[11]=[720,7522,384,3936],l[12]=[690,7745,336,1104],l[13]=[600,8225,120,1272],l[14]=[660,5569,840,576],n[1]=[3690,1505,2592,3240],n[2]=[3600,3233,2112,48],r[1]=[2970,6369,3408,4008],r[2]=[3600,3233,2112,48],s[1]=[6630,993,2784,4344];var i=e("select.flag-en-type").val(),c=e("select.flag-es-type").val(),g=e("select.flag-fr-type").val(),f=e("select.flag-ar-type").val(),p=e("select.flag-tw-type").val(),d=e("select.flag-zh-type").val(),u=e("select.flag-pt-type").val(),w=i<=0?"":".weglot-flags.en > a:before, .weglot-flags.en > span:before { background-position: -"+t[i][0]+"px 0 !important; } .weglot-flags.flag-1.en > a:before, .weglot-flags.flag-1.en > span:before { background-position: -"+t[i][1]+"px 0 !important; } .weglot-flags.flag-2.en > a:before, .weglot-flags.flag-2.en > span:before { background-position: -"+t[i][2]+"px 0 !important; } .weglot-flags.flag-3.en > a:before, .weglot-flags.flag-3.en > span:before { background-position: -"+t[i][3]+"px 0 !important; } ",b=c<=0?"":".weglot-flags.es > a:before, .weglot-flags.es > span:before { background-position: -"+o[c][0]+"px 0 !important; } .weglot-flags.flag-1.es > a:before, .weglot-flags.flag-1.es > span:before { background-position: -"+o[c][1]+"px 0 !important; } .weglot-flags.flag-2.es > a:before, .weglot-flags.flag-2.es > span:before { background-position: -"+o[c][2]+"px 0 !important; } .weglot-flags.flag-3.es > a:before, .weglot-flags.flag-3.es > span:before { background-position: -"+o[c][3]+"px 0 !important; } ",y=g<=0?"":".weglot-flags.fr > a:before, .weglot-flags.fr > span:before { background-position: -"+a[g][0]+"px 0 !important; } .weglot-flags.flag-1.fr > a:before, .weglot-flags.flag-1.fr > span:before { background-position: -"+a[g][1]+"px 0 !important; } .weglot-flags.flag-2.fr > a:before, .weglot-flags.flag-2.fr > span:before { background-position: -"+a[g][2]+"px 0 !important; } .weglot-flags.flag-3.fr > a:before, .weglot-flags.flag-3.fr > span:before { background-position: -"+a[g][3]+"px 0 !important; } ",m=f<=0?"":".weglot-flags.ar > a:before, .weglot-flags.ar > span:before { background-position: -"+l[f][0]+"px 0 !important; } .weglot-flags.flag-1.ar > a:before, .weglot-flags.flag-1.ar > span:before { background-position: -"+l[f][1]+"px 0 !important; } .weglot-flags.flag-2.ar > a:before, .weglot-flags.flag-2.ar > span:before { background-position: -"+l[f][2]+"px 0 !important; } .weglot-flags.flag-3.ar > a:before, .weglot-flags.flag-3.ar > span:before { background-position: -"+l[f][3]+"px 0 !important; } ",v=p<=0?"":".weglot-flags.tw > a:before, .weglot-flags.tw > span:before { background-position: -"+n[p][0]+"px 0 !important; } .weglot-flags.flag-1.tw > a:before, .weglot-flags.flag-1.tw > span:before { background-position: -"+n[p][1]+"px 0 !important; } .weglot-flags.flag-2.tw > a:before, .weglot-flags.flag-2.tw > span:before { background-position: -"+n[p][2]+"px 0 !important; } .weglot-flags.flag-3.tw > a:before, .weglot-flags.flag-3.tw > span:before { background-position: -"+n[p][3]+"px 0 !important; } ",h=d<=0?"":".weglot-flags.zh > a:before, .weglot-flags.zh > span:before { background-position: -"+r[d][0]+"px 0 !important; } .weglot-flags.flag-1.zh > a:before, .weglot-flags.flag-1.zh > span:before { background-position: -"+r[d][1]+"px 0 !important; } .weglot-flags.flag-2.zh > a:before, .weglot-flags.flag-2.zh > span:before { background-position: -"+r[d][2]+"px 0 !important; } .weglot-flags.flag-3.zh > a:before, .weglot-flags.flag-3.zh > span:before { background-position: -"+r[d][3]+"px 0 !important; } ",_=u<=0?"":".weglot-flags.pt > a:before, .weglot-flags.pt > span:before { background-position: -"+s[u][0]+"px 0 !important; } .weglot-flags.flag-1.pt > a:before, .weglot-flags.flag-1.pt > span:before { background-position: -"+s[u][1]+"px 0 !important; } .weglot-flags.flag-2.pt > a:before, .weglot-flags.flag-2.pt > span:before { background-position: -"+s[u][2]+"px 0 !important; } .weglot-flags.flag-3.pt > a:before, .weglot-flags.flag-3.pt > span:before { background-position: -"+s[u][3]+"px 0 !important; } ";e("#flag_css, #weglot-css-flag-css").text(w+b+y+m+v+h+_)}()}));var t=e("#flag_css").text();t.trim()&&e("#weglot-css-flag-css").text(t)};document.addEventListener("DOMContentLoaded",()=>{t()})};var g=function(){jQuery;document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#private_mode");e&&0!=e.length&&(document.querySelector("#private_mode").addEventListener("change",(function(e){document.querySelectorAll(".private-mode-lang--input").forEach(t=>{t.checked=e.target.checked})})),document.querySelectorAll(".private-mode-lang--input").forEach(e=>{e.addEventListener("change",(function(e){0===document.querySelectorAll(".private-mode-lang--input:checked").length&&(document.querySelector("#private_mode").checked=!1)}))}))})};o(1),o(2);a(),n(),l(),r(),s(),i(),c(),g()}]);
1
+ !function(e){var t={};function o(a){if(t[a])return t[a].exports;var l=t[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,o),l.l=!0,l.exports}o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)o.d(a,l,function(t){return e[t]}.bind(null,l));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/",o(o.s=4)}([,function(e,t){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var a=arguments[1],l=0;l<o;){var n=t[l];if(e.call(a,n,l,t))return n;l++}},configurable:!0,writable:!0})},function(e,t){Array.prototype.filter||(Array.prototype.filter=function(e,t){"use strict";if("Function"!=typeof e&&"function"!=typeof e||!this)throw new TypeError;var o=this.length>>>0,a=new Array(o),l=this,n=0,r=-1;if(void 0===t)for(;++r!==o;)r in this&&e(l[r],r,l)&&(a[n++]=l[r]);else for(;++r!==o;)r in this&&e.call(t,l[r],r,l)&&(a[n++]=l[r]);return a.length=n,a})},,function(e,t,o){"use strict";o.r(t);var a=function(){const e=jQuery;let t;const o=()=>{let o=e("#original_language").val();e("#original_language").on("change",(function(a){const l=o,n=o;o=a.target.value,t[0].selectize.removeOption(o);const r=weglot_languages.available.find(e=>e.internal_code===n),s=weglot_languages.available.find(e=>e.internal_code===o);t[0].selectize.addOption(r);const c=e("#is_fullname").is(":checked");let i="";e("#with_name").is(":checked")&&(i=c?s.local:s.internal_code.toUpperCase()),e(".wgcurrent.wg-li").removeClass(l).addClass(o).attr("data-code-language",o).find("span").text(i)})),t=e(".weglot-select-destination").selectize({delimiter:"|",persist:!1,valueField:"internal_code",labelField:"local",searchField:["internal_code","english","local"],sortField:[{field:"english",direction:"asc"}],maxItems:weglot_languages.limit,plugins:["remove_button"],options:weglot_languages.available.filter(e=>e.internal_code!==weglot_languages.original),render:{option:function(e,t){return`<div class="weglot__choice__language"><span class="weglot__choice__language--english">${t(e.english)}</span><span class="weglot__choice__language--local">${t(e.local)}[${t(e.external_code)}]</span></div>`}}}).on("change",o=>{const a=t[0].selectize.getValue(),l=e("#li-button-tpl");if(0===l.length)return;const n=e("#is_fullname").is(":checked"),r=e("#with_name").is(":checked"),s=e("#with_flags").is(":checked");let c="";s&&(c="weglot-flags");let i="";var g=e("label.weglot-flags").attr("class").split(/\s+/);e.each(g,(function(e,t){if(1==t.includes("flag-"))return c+=" "+t,!1})),a.forEach(e=>{const t=weglot_languages.available.find(t=>t.internal_code===e);let o="";r&&(o=n?t.local:e.toUpperCase()),i+=l.html().replace("{LABEL_LANGUAGE}",o).replace(new RegExp("{CODE_LANGUAGE}","g"),e).replace("{CLASSES}",c)}),e(".country-selector ul").html(i)}),window.addEventListener("weglotCheckApi",e=>{t[0].selectize.settings.maxItems=weglot_languages.limit})};document.addEventListener("DOMContentLoaded",()=>{o()})};var l=function(){const e=jQuery;document.addEventListener("DOMContentLoaded",()=>{e("#weglot-box-first-settings .weglot-btn-close").on("click",(function(t){t.preventDefault(),e("#weglot-box-first-settings").hide()}))})};var n=function(){const e=()=>{document.querySelector("#tpl-exclusion-url");const e=document.querySelector("#tpl-exclusion-block"),t=document.querySelector("#container-exclude_blocks");function o(e){e.preventDefault(),this.parentNode.remove()}if(document.querySelector("#js-add-exclude-block")){document.querySelectorAll("#container-exclude_blocks input").forEach(e=>{e.addEventListener("keypress",(function(e){if(13===e.keyCode||13===e.which)return e.preventDefault(),!1}))}),document.querySelectorAll("#container-exclude_blocks input"),document.querySelector("#js-add-exclude-block").addEventListener("click",a=>{let l=!0;document.querySelectorAll("#container-exclude_blocks input").forEach(e=>{0===e.value.length&&(l=!1)}),a.preventDefault(),!0===l&&(document.querySelector("#js-add-exclude-block").classList.add("disable-btn"),t.insertAdjacentHTML("beforeend",e.innerHTML),document.querySelector("#container-exclude_blocks .item-exclude:last-child .js-btn-remove-exclude").addEventListener("click",o),document.querySelectorAll("#container-exclude_blocks input").forEach(e=>{e.addEventListener("keypress",(function(e){if(13===e.keyCode||13===e.which)return e.preventDefault(),!1;document.querySelector("#js-add-exclude-block").classList.remove("disable-btn")}))}))})}document.querySelectorAll(".js-btn-remove").forEach(e=>{e.addEventListener("click",o)})};document.addEventListener("DOMContentLoaded",()=>{e()})};var r=function(){const e=jQuery,t=()=>{let t=e("#type_flags option:selected").data("value"),o=[];o.push(e(".country-selector label").data("code-language")),e(".country-selector li").each((t,a)=>{o.push(e(a).data("code-language"))});const a=weglot_languages.available.filter(e=>o.indexOf(e.external_code)>=0);e("#weglot-css-inline").text(weglot_css.inline),e("#is_dropdown").on("change",(function(){e(".country-selector").toggleClass("weglot-inline"),e(".country-selector").toggleClass("weglot-dropdown")})),e("#with_flags").on("change",(function(){e(".country-selector label, .country-selector li").toggleClass("weglot-flags")})),e("#type_flags").on("change",(function(o){e(".country-selector label, .country-selector li").removeClass("flag-"+t);const a=e(":selected",this).data("value");e(".country-selector label, .country-selector li").addClass("flag-"+a),t=a}));const l=()=>{const t=a.find(t=>t.external_code===e(".country-selector label").data("code-language")),o=e("#is_fullname").is(":checked"),l=o?t.local:t.internal_code.toUpperCase();e(".country-selector label a, .country-selector label span").text(l),e(".country-selector li").each((t,l)=>{const n=a.find(t=>t.internal_code===e(l).data("code-language")),r=o?n.local:n.internal_code.toUpperCase();e(l).find("a").text(r)})};e("#with_name").on("change",(function(t){t.target.checked?l():(e(".country-selector label a, .country-selector label span").text(""),e(".country-selector li a, .country-selector li span").each((t,o)=>{e(o).text("")}))})),e("#is_fullname").on("change",(function(t){if(e("#with_name").is(":checked"))if(t.target.checked)l();else{const t=a.find(t=>t.internal_code===e(".country-selector label").data("code-language"));e(".country-selector label a, .country-selector label span").text(t.internal_code.toUpperCase()),e(".country-selector li").each((t,o)=>{const l=a.find(t=>t.internal_code===e(o).data("code-language"));e(o).find("a").text(l.internal_code.toUpperCase()),e(o).find("span").text(l.internal_code.toUpperCase())})}})),e("#override_css").on("keyup",(function(t){e("#weglot-css-inline").text(t.target.value)}))};document.addEventListener("DOMContentLoaded",()=>{0!==e(".weglot-preview").length&&t()})};var s=function(){const e=jQuery,t=()=>{e("#api_key_private").blur((function(){var t=e(this).val();if(0===t.length)return e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-nokkey"></span>'),void e("#wrap-weglot #submit").prop("disabled",!0);function o(){e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-nokkey"></span><p class="weglot-keyres">Make sure you enter a valid Weglot API key. If the key is still not validating, you can contact your host provider and ask if it\'s possible to whitelist api.weglot.com and weglot.com</p>'),e("#wrap-weglot #submit").prop("disabled",!0)}e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-ckeckkey"></span>'),e.ajax({method:"POST",url:ajaxurl,data:{action:"get_user_info",api_key:t},success:({data:t,success:a})=>{e(".weglot-keyres").remove(),a?function(t){e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-okkey"></span>'),e("#wrap-weglot #submit").prop("disabled",!1);const o=new CustomEvent("weglotCheckApi",{detail:t});window.dispatchEvent(o)}(t):o()}}).fail((function(){o()}))})),e(".toplevel_page_weglot-settings form").submit((function(t){e("#wrap-weglot #submit").prop("disabled",!0)}))};document.addEventListener("DOMContentLoaded",()=>{t()})};var c=function(){jQuery;document.addEventListener("DOMContentLoaded",()=>{jQuery(document).ready((function(e){wp.codeEditor.initialize(e("#override_css"),cm_settings)}))})};var i=function(){const e=jQuery;"undefined"!=typeof weglot_css&&e("#weglot-css-flag-css").text(weglot_css.flag_css);const t=()=>{e(".flag-style-openclose").on("click",(function(){e(".flag-style-wrapper").toggle()})),e(".old-flag-style").on("click",(function(){e(".old-flag-wrapper").toggle()})),e("select.flag-en-type, select.flag-es-type, select.flag-pt-type, select.flag-fr-type, select.flag-ar-type, select.flag-tw-type, select.flag-zh-type").on("change",(function(){!function(){var t=new Array,o=new Array,a=new Array,l=new Array,n=new Array,r=new Array,s=new Array;t[1]=[3570,7841,48,2712],t[2]=[3720,449,3048,4440],t[3]=[3840,1281,2712,4224],t[4]=[3240,5217,1224,2112],t[5]=[4050,3585,1944,2496],t[6]=[2340,3457,2016,2016],o[1]=[4320,4641,3144,3552],o[2]=[3750,353,2880,4656],o[3]=[4200,1601,2568,3192],o[4]=[3990,5793,1032,2232],o[5]=[5460,897,4104,3120],o[6]=[3810,7905,216,3888],o[7]=[3630,8065,192,2376],o[8]=[3780,1473,2496,4104],o[9]=[6120,2145,4680,2568],o[10]=[4440,3009,3240,1176],o[11]=[5280,1825,3936,2976],o[12]=[4770,2081,3624,1008],o[13]=[4080,3201,2160,2544],o[14]=[4590,5761,3432,624],o[15]=[4350,2209,3360,2688],o[16]=[5610,5249,3168,528],o[17]=[5070,1729,3792,2952],o[18]=[6870,5953,96,3408],o[19]=[4020,5697,1056,1224],a[1]=[2760,736,2856,4416],a[2]=[3840,1280,2712,4224],a[3]=[5700,7201,5016,2400],a[4]=[2220,4160,1632,1944],l[1]=[1830,129,3096,5664],l[2]=[5100,2177,3840,2904],l[3]=[4890,3425,3648,2136],l[4]=[1320,3681,1896,4080],l[5]=[1260,3841,1824,1200],l[6]=[1020,3969,1608,312],l[7]=[4800,4065,3600,72],l[8]=[4710,4865,3504,480],l[9]=[6720,5984,5112,3792],l[10]=[4500,7233,3288,1800],l[11]=[720,7522,384,3936],l[12]=[690,7745,336,1104],l[13]=[600,8225,120,1272],l[14]=[660,5569,840,576],n[1]=[3690,1505,2592,3240],n[2]=[3600,3233,2112,48],r[1]=[2970,6369,3408,4008],r[2]=[3600,3233,2112,48],s[1]=[6630,993,2784,4344];var c=e("select.flag-en-type").val(),i=e("select.flag-es-type").val(),g=e("select.flag-fr-type").val(),f=e("select.flag-ar-type").val(),p=e("select.flag-tw-type").val(),u=e("select.flag-zh-type").val(),d=e("select.flag-pt-type").val(),w=c<=0?"":".weglot-flags.en > a:before, .weglot-flags.en > span:before { background-position: -"+t[c][0]+"px 0 !important; } .weglot-flags.flag-1.en > a:before, .weglot-flags.flag-1.en > span:before { background-position: -"+t[c][1]+"px 0 !important; } .weglot-flags.flag-2.en > a:before, .weglot-flags.flag-2.en > span:before { background-position: -"+t[c][2]+"px 0 !important; } .weglot-flags.flag-3.en > a:before, .weglot-flags.flag-3.en > span:before { background-position: -"+t[c][3]+"px 0 !important; } ",b=i<=0?"":".weglot-flags.es > a:before, .weglot-flags.es > span:before { background-position: -"+o[i][0]+"px 0 !important; } .weglot-flags.flag-1.es > a:before, .weglot-flags.flag-1.es > span:before { background-position: -"+o[i][1]+"px 0 !important; } .weglot-flags.flag-2.es > a:before, .weglot-flags.flag-2.es > span:before { background-position: -"+o[i][2]+"px 0 !important; } .weglot-flags.flag-3.es > a:before, .weglot-flags.flag-3.es > span:before { background-position: -"+o[i][3]+"px 0 !important; } ",y=g<=0?"":".weglot-flags.fr > a:before, .weglot-flags.fr > span:before { background-position: -"+a[g][0]+"px 0 !important; } .weglot-flags.flag-1.fr > a:before, .weglot-flags.flag-1.fr > span:before { background-position: -"+a[g][1]+"px 0 !important; } .weglot-flags.flag-2.fr > a:before, .weglot-flags.flag-2.fr > span:before { background-position: -"+a[g][2]+"px 0 !important; } .weglot-flags.flag-3.fr > a:before, .weglot-flags.flag-3.fr > span:before { background-position: -"+a[g][3]+"px 0 !important; } ",m=f<=0?"":".weglot-flags.ar > a:before, .weglot-flags.ar > span:before { background-position: -"+l[f][0]+"px 0 !important; } .weglot-flags.flag-1.ar > a:before, .weglot-flags.flag-1.ar > span:before { background-position: -"+l[f][1]+"px 0 !important; } .weglot-flags.flag-2.ar > a:before, .weglot-flags.flag-2.ar > span:before { background-position: -"+l[f][2]+"px 0 !important; } .weglot-flags.flag-3.ar > a:before, .weglot-flags.flag-3.ar > span:before { background-position: -"+l[f][3]+"px 0 !important; } ",v=p<=0?"":".weglot-flags.tw > a:before, .weglot-flags.tw > span:before { background-position: -"+n[p][0]+"px 0 !important; } .weglot-flags.flag-1.tw > a:before, .weglot-flags.flag-1.tw > span:before { background-position: -"+n[p][1]+"px 0 !important; } .weglot-flags.flag-2.tw > a:before, .weglot-flags.flag-2.tw > span:before { background-position: -"+n[p][2]+"px 0 !important; } .weglot-flags.flag-3.tw > a:before, .weglot-flags.flag-3.tw > span:before { background-position: -"+n[p][3]+"px 0 !important; } ",h=u<=0?"":".weglot-flags.zh > a:before, .weglot-flags.zh > span:before { background-position: -"+r[u][0]+"px 0 !important; } .weglot-flags.flag-1.zh > a:before, .weglot-flags.flag-1.zh > span:before { background-position: -"+r[u][1]+"px 0 !important; } .weglot-flags.flag-2.zh > a:before, .weglot-flags.flag-2.zh > span:before { background-position: -"+r[u][2]+"px 0 !important; } .weglot-flags.flag-3.zh > a:before, .weglot-flags.flag-3.zh > span:before { background-position: -"+r[u][3]+"px 0 !important; } ",_=d<=0?"":".weglot-flags.pt > a:before, .weglot-flags.pt > span:before { background-position: -"+s[d][0]+"px 0 !important; } .weglot-flags.flag-1.pt > a:before, .weglot-flags.flag-1.pt > span:before { background-position: -"+s[d][1]+"px 0 !important; } .weglot-flags.flag-2.pt > a:before, .weglot-flags.flag-2.pt > span:before { background-position: -"+s[d][2]+"px 0 !important; } .weglot-flags.flag-3.pt > a:before, .weglot-flags.flag-3.pt > span:before { background-position: -"+s[d][3]+"px 0 !important; } ";e("#flag_css, #weglot-css-flag-css").text(w+b+y+m+v+h+_)}()}));var t=e("#flag_css").text();t.trim()&&e("#weglot-css-flag-css").text(t)};document.addEventListener("DOMContentLoaded",()=>{t()})};var g=function(){jQuery;document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#private_mode");e&&0!=e.length&&(document.querySelector("#private_mode").addEventListener("change",(function(e){document.querySelectorAll(".private-mode-lang--input").forEach(t=>{t.checked=e.target.checked})})),document.querySelectorAll(".private-mode-lang--input").forEach(e=>{e.addEventListener("change",(function(e){0===document.querySelectorAll(".private-mode-lang--input:checked").length&&(document.querySelector("#private_mode").checked=!1)}))}))})};o(1),o(2);a(),n(),l(),r(),s(),c(),i(),g()}]);
dist/css/admin-css.css CHANGED
@@ -322,4 +322,4 @@
322
  opacity: 0.5;
323
  background-color: #fafafa;
324
  }
325
- #custom_flag_tips{font-size:12px}#weglot-url-translate .CodeMirror-placeholder,#wrap-weglot .CodeMirror-placeholder{color:#c0c0c0}#weglot-url-translate .CodeMirror-wrap,#wrap-weglot .CodeMirror-wrap{border-radius:4px;border:1px solid #c0c0c0;width:100%;max-width:550px;height:200px}#weglot-url-translate .weglot__choice__language,#wrap-weglot .weglot__choice__language{border-bottom:1px solid #eee;margin:5px 0}#weglot-url-translate .weglot__choice__language--local,#wrap-weglot .weglot__choice__language--local{border-width:50px;color:#a6a6a6;display:block}#weglot-url-translate p.weglot-keyres,#wrap-weglot p.weglot-keyres{font-style:italic;color:#ff6464}#weglot-url-translate .weglot_text_error,#wrap-weglot .weglot_text_error{color:#dc3232}#weglot-url-translate .weglot_reset,#wrap-weglot .weglot_reset{text-decoration:underline;font-style:italic}#weglot-url-translate .weglot_reset:hover,#wrap-weglot .weglot_reset:hover{cursor:pointer}#weglot-url-translate .btn,#wrap-weglot .btn{background:#335ee2;display:inline-block;padding:8px 10px;border-radius:4px;-webkit-transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;-o-transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;outline:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-weight:700;cursor:pointer;text-align:center;text-decoration:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;color:white;border:1px solid #335ee2}#weglot-url-translate .btn.btn-soft,#wrap-weglot .btn.btn-soft{background-color:#fff;color:#24284c;border-radius:4px;border:1px solid #7e8993;line-height:1.4em}#weglot-url-translate .btn.btn-primary:active,#weglot-url-translate .btn.btn-primary:focus,#weglot-url-translate .btn.btn-primary:hover,#wrap-weglot .btn.btn-primary:active,#wrap-weglot .btn.btn-primary:focus,#wrap-weglot .btn.btn-primary:hover{border-color:#446dea;background-color:#446dea}#weglot-url-translate .js-btn-remove,#wrap-weglot .js-btn-remove{border:none;background-color:#e35b5b;color:#fff;display:inline-block;width:22px;height:22px;border-radius:50%;cursor:pointer;-webkit-transform:translateY(-5%);-ms-transform:translateY(-5%);transform:translateY(-5%);-webkit-transition:opacity 175ms linear;-o-transition:opacity 175ms linear;transition:opacity 175ms linear;outline:0;padding:0;margin:4px 0;vertical-align:middle}#weglot-url-translate .js-btn-remove:hover,#wrap-weglot .js-btn-remove:hover{background-color:#c62d2d}#weglot-url-translate .item-exclude,#wrap-weglot .item-exclude{position:relative;margin-bottom:10px}#weglot-url-translate::-webkit-input-placeholder,#weglot-url-translate:-moz-placeholder,#weglot-url-translate::-moz-placeholder,#weglot-url-translate:-ms-input-placeholder,#wrap-weglot::-webkit-input-placeholder,#wrap-weglot:-moz-placeholder,#wrap-weglot::-moz-placeholder,#wrap-weglot:-ms-input-placeholder{color:#c0c0c0}#weglot-url-translate .sub-label,#wrap-weglot .sub-label{font-size:13px;font-weight:normal;margin:2px 0 0;color:#444;opacity:0.8}#weglot-url-translate .weglot-select-original,#wrap-weglot .weglot-select-original{height:36px !important;margin:0}#weglot-url-translate .original-select,#weglot-url-translate #type_flags,#wrap-weglot .original-select,#wrap-weglot #type_flags{padding:8px;height:36px !important;width:300px}#weglot-url-translate #type_flags,#wrap-weglot #type_flags{width:150px}#weglot-url-translate .selectize-control.multi .selectize-input,#wrap-weglot .selectize-control.multi .selectize-input{border:1px solid #7e8993;border-radius:4px;-webkit-box-shadow:unset;box-shadow:unset}#weglot-url-translate .selectize-control.multi .selectize-input>div,#wrap-weglot .selectize-control.multi .selectize-input>div{background-color:#eff0ff;border:1px solid #7e8993;border-radius:2px}#weglot-url-translate .selectize-control.multi .selectize-input>div .remove,#wrap-weglot .selectize-control.multi .selectize-input>div .remove{border-left-color:#7e8993}#weglot-url-translate .wg-input-textarea,#wrap-weglot .wg-input-textarea{padding:8px}#weglot-url-translate .wg-input-textarea::-webkit-input-placeholder,#wrap-weglot .wg-input-textarea::-webkit-input-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::-moz-placeholder,#wrap-weglot .wg-input-textarea::-moz-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::-ms-input-placeholder,#wrap-weglot .wg-input-textarea::-ms-input-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::placeholder,#wrap-weglot .wg-input-textarea::placeholder{color:#c0c0c0}#weglot-url-translate .weglot-select.weglot-select-original,#weglot-url-translate input[type="text"],#weglot-url-translate textarea,#weglot-url-translate select,#weglot-url-translate #type_flags,#wrap-weglot .weglot-select.weglot-select-original,#wrap-weglot input[type="text"],#wrap-weglot textarea,#wrap-weglot select,#wrap-weglot #type_flags{padding:0 8px;border-radius:4px;border:1px solid #7e8993}#weglot-url-translate .weglot-select.weglot-select-original:focus,#weglot-url-translate input[type="text"]:focus,#weglot-url-translate textarea:focus,#weglot-url-translate select:focus,#weglot-url-translate #type_flags:focus,#wrap-weglot .weglot-select.weglot-select-original:focus,#wrap-weglot input[type="text"]:focus,#wrap-weglot textarea:focus,#wrap-weglot select:focus,#wrap-weglot #type_flags:focus{border-color:#446dea !important;-webkit-box-shadow:none !important;box-shadow:none !important}#weglot-url-translate .weglot-info,#wrap-weglot .weglot-info{position:relative;color:#3741cc;font-weight:bold}#weglot-url-translate .weglot-info:hover .wg-tooltip,#wrap-weglot .weglot-info:hover .wg-tooltip{line-height:1.4;position:absolute;top:27px;display:block !important;background-color:#24292d;width:160px;padding:10px;color:white;font-weight:normal;border:1px solid #e0e0e0;font-size:12px}#weglot-url-translate .weglot-box-overlay,#wrap-weglot .weglot-box-overlay{position:fixed;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%;background-color:rgba(0,0,0,0.85);z-index:9999;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}#weglot-url-translate .weglot-box-overlay .weglot-box,#wrap-weglot .weglot-box-overlay .weglot-box{background-color:#fff;padding:25px;text-align:center;-webkit-box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75);box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75)}#weglot-url-translate .weglot-box-overlay .weglot-box--title,#wrap-weglot .weglot-box-overlay .weglot-box--title{font-size:24px;line-height:1.3}#weglot-url-translate .weglot-box-overlay .weglot-box--text,#wrap-weglot .weglot-box-overlay .weglot-box--text{font-size:18px}#weglot-url-translate .weglot-box-overlay .weglot-box--subtext,#wrap-weglot .weglot-box-overlay .weglot-box--subtext{font-size:12px;font-style:italic}#weglot-url-translate .weglot-box-overlay .weglot-btn-close,#wrap-weglot .weglot-box-overlay .weglot-btn-close{float:right;cursor:pointer}#weglot-url-translate .flag-style-openclose,#wrap-weglot .flag-style-openclose{display:inline-block;font-size:12px;text-decoration:underline;cursor:default;margin:12px 15px 0 10px;color:#46b450}#weglot-url-translate .flag-style-openclose:hover,#wrap-weglot .flag-style-openclose:hover{color:#399648;cursor:pointer}#weglot-url-translate .flag-style-wrapper,#wrap-weglot .flag-style-wrapper{padding:15px 0px}#weglot-url-translate .flag-style-wrapper p,#wrap-weglot .flag-style-wrapper p{font-size:12px !important}#weglot-url-translate .flag-style-wrapper select,#wrap-weglot .flag-style-wrapper select{font-size:12px;margin:0 2px 6px 0;padding:0 26px 0 8px}#weglot-url-translate #private_mode+p+div,#wrap-weglot #private_mode+p+div{display:none}#weglot-url-translate #private_mode:checked+p+div,#wrap-weglot #private_mode:checked+p+div{display:block}#weglot-url-translate #private-mode-detail,#wrap-weglot #private-mode-detail{margin-top:20px}#weglot-url-translate #private-mode-detail .private-mode-detail-lang,#wrap-weglot #private-mode-detail .private-mode-detail-lang{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:10px;margin-left:25px}#weglot-url-translate #private-mode-detail .private-mode-detail-lang input[type="checkbox"],#wrap-weglot #private-mode-detail .private-mode-detail-lang input[type="checkbox"]{margin-top:-1px}#wrap-weglot{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:15px}#wrap-weglot .wrap{-webkit-box-flex:4;-ms-flex:4;flex:4}#wrap-weglot input[type="text"]:not(#destination_language-selectized),#wrap-weglot input[type="url"]{padding:0 8px;height:36px}#wrap-weglot select{height:36px;vertical-align:top;border-radius:4px;padding:0 26px 0 8px}#wrap-weglot input[type="checkbox"]{margin-top:-4px}#wrap-weglot .weglot-ckeckkey:before{content:"\21BB";display:inline-block;color:#666;padding:0 6px 0 0;font-size:16px;padding:0 10px;line-height:1em;-webkit-animation:spin 2s infinite linear}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}#wrap-weglot .weglot-nokkey:before{content:"\274C";display:inline-block;color:#dc3232;padding:0 6px 0 0;font-size:15px;padding:0 10px}#wrap-weglot .weglot-okkey:before{content:"\2713";display:inline-block;color:#46b450;padding:0 10px;font-size:20px;font-weight:bold;padding:0 10px}#wrap-weglot .weglot-infobox{-webkit-box-flex:2;-ms-flex:2;flex:2;-ms-flex-item-align:start;align-self:start;margin:10px 20px 0 2px;background-color:white;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden}#wrap-weglot .weglot-infobox h3{color:#18164c;background-color:white;padding:30px 30px 0 30px;margin:0px;font-size:23px;line-height:1.3}#wrap-weglot .weglot-infobox div{padding:15px 30px 30px 30px}#wrap-weglot .weglot-infobox .weglot-editbtn{-webkit-box-shadow:0 2px 4px 0 rgba(1,1,2,0.05);box-shadow:0 2px 4px 0 rgba(1,1,2,0.05);background-color:#3d46fb;color:#fff;height:45px;border-radius:23px;line-height:45px;font-size:14px !important;text-decoration:none;padding:0 30px;display:inline-block;-webkit-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;transition:all 0.2s ease-in}#wrap-weglot .weglot-infobox .weglot-editbtn:hover{color:white;background:#252ed7}#wrap-weglot input[type="text"],#wrap-weglot .selectize-control,#wrap-weglot .wg-input-textarea,#wrap-weglot .weglot-select-original{width:100%;max-width:320px}#wrap-weglot #submit{height:50px;padding:0 30px !important;font-size:16px}#wrap-weglot .description{display:inline}#wrap-weglot .wg-tooltip{position:absolute;display:none}#wrap-weglot #mainform{margin-bottom:50px}#wrap-weglot .arrow-up{width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #24292d;position:absolute;top:-10px;left:36px}#wrap-weglot .question-icon{font-size:17px}#wrap-weglot .form-table{margin-bottom:50px}#wrap-weglot .country-selector{z-index:1 !important}#weglot-url-translate .weglot_custom_url{border-bottom:1px solid #ccc;margin-bottom:20px;padding-bottom:10px}#weglot-url-translate .weglot_custom_url a{margin:5px 0px;display:inline-block}#weglot-url-translate .weglot_custom_url--text_link{margin-bottom:4px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link input[type="text"]{min-height:24px !important;height:24px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link button{margin-top:-2px;font-size:11px;padding:0 8px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link button.button-weglot-lang .dashicons{font-size:14px;line-height:21px;margin-right:-3px;margin-left:-4px}#weglot-url-translate .weglot_custom_url a.weglot_reset{text-decoration:none}#weglot-url-translate .weglot_custom_url a.weglot_reset:link,#weglot-url-translate .weglot_custom_url a.weglot_reset:visited,#weglot-url-translate .weglot_custom_url a.weglot_reset:hover,#weglot-url-translate .weglot_custom_url a.weglot_reset:active{text-decoration:none}
322
  opacity: 0.5;
323
  background-color: #fafafa;
324
  }
325
+ #custom_flag_tips{font-size:12px}#weglot-url-translate .CodeMirror-placeholder,#wrap-weglot .CodeMirror-placeholder{color:#c0c0c0}#weglot-url-translate .CodeMirror-wrap,#wrap-weglot .CodeMirror-wrap{border-radius:4px;border:1px solid #c0c0c0;width:100%;max-width:550px;height:200px}#weglot-url-translate .weglot__choice__language,#wrap-weglot .weglot__choice__language{border-bottom:1px solid #eee;margin:5px 0}#weglot-url-translate .weglot__choice__language--local,#wrap-weglot .weglot__choice__language--local{border-width:50px;color:#a6a6a6;display:block}#weglot-url-translate p.weglot-keyres,#wrap-weglot p.weglot-keyres{font-style:italic;color:#ff6464}#weglot-url-translate .weglot_text_error,#wrap-weglot .weglot_text_error{color:#dc3232}#weglot-url-translate .weglot_reset,#wrap-weglot .weglot_reset{text-decoration:underline;font-style:italic}#weglot-url-translate .weglot_reset:hover,#wrap-weglot .weglot_reset:hover{cursor:pointer}#weglot-url-translate .btn,#wrap-weglot .btn{background:#335ee2;display:inline-block;padding:8px 10px;border-radius:4px;-webkit-transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;-o-transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;outline:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-weight:700;cursor:pointer;text-align:center;text-decoration:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;color:white;border:1px solid #335ee2}#weglot-url-translate .btn.btn-soft,#wrap-weglot .btn.btn-soft{background-color:#fff;color:#24284c;border-radius:4px;border:1px solid #7e8993;line-height:1.4em}#weglot-url-translate .btn.btn-soft.disable-btn,#wrap-weglot .btn.btn-soft.disable-btn{background:#eaeaea;opacity:0.8}#weglot-url-translate .btn.btn-primary:active,#weglot-url-translate .btn.btn-primary:focus,#weglot-url-translate .btn.btn-primary:hover,#wrap-weglot .btn.btn-primary:active,#wrap-weglot .btn.btn-primary:focus,#wrap-weglot .btn.btn-primary:hover{border-color:#446dea;background-color:#446dea}#weglot-url-translate .js-btn-remove,#wrap-weglot .js-btn-remove{border:none;background-color:#e35b5b;color:#fff;display:inline-block;width:22px;height:22px;border-radius:50%;cursor:pointer;-webkit-transform:translateY(-5%);-ms-transform:translateY(-5%);transform:translateY(-5%);-webkit-transition:opacity 175ms linear;-o-transition:opacity 175ms linear;transition:opacity 175ms linear;outline:0;padding:0;margin:4px 0;vertical-align:middle}#weglot-url-translate .js-btn-remove:hover,#wrap-weglot .js-btn-remove:hover{background-color:#c62d2d}#weglot-url-translate .item-exclude,#wrap-weglot .item-exclude{position:relative;margin-bottom:10px}#weglot-url-translate::-webkit-input-placeholder,#weglot-url-translate:-moz-placeholder,#weglot-url-translate::-moz-placeholder,#weglot-url-translate:-ms-input-placeholder,#wrap-weglot::-webkit-input-placeholder,#wrap-weglot:-moz-placeholder,#wrap-weglot::-moz-placeholder,#wrap-weglot:-ms-input-placeholder{color:#c0c0c0}#weglot-url-translate .sub-label,#wrap-weglot .sub-label{font-size:13px;font-weight:normal;margin:2px 0 0;color:#444;opacity:0.8}#weglot-url-translate .weglot-select-original,#wrap-weglot .weglot-select-original{height:36px !important;margin:0}#weglot-url-translate .original-select,#weglot-url-translate #type_flags,#wrap-weglot .original-select,#wrap-weglot #type_flags{padding:8px;height:36px !important;width:300px}#weglot-url-translate #type_flags,#wrap-weglot #type_flags{width:150px}#weglot-url-translate .selectize-control.multi .selectize-input,#wrap-weglot .selectize-control.multi .selectize-input{border:1px solid #7e8993;border-radius:4px;-webkit-box-shadow:unset;box-shadow:unset}#weglot-url-translate .selectize-control.multi .selectize-input>div,#wrap-weglot .selectize-control.multi .selectize-input>div{background-color:#eff0ff;border:1px solid #7e8993;border-radius:2px}#weglot-url-translate .selectize-control.multi .selectize-input>div .remove,#wrap-weglot .selectize-control.multi .selectize-input>div .remove{border-left-color:#7e8993}#weglot-url-translate .wg-input-textarea,#wrap-weglot .wg-input-textarea{padding:8px}#weglot-url-translate .wg-input-textarea::-webkit-input-placeholder,#wrap-weglot .wg-input-textarea::-webkit-input-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::-moz-placeholder,#wrap-weglot .wg-input-textarea::-moz-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::-ms-input-placeholder,#wrap-weglot .wg-input-textarea::-ms-input-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::placeholder,#wrap-weglot .wg-input-textarea::placeholder{color:#c0c0c0}#weglot-url-translate .weglot-select.weglot-select-original,#weglot-url-translate input[type="text"],#weglot-url-translate textarea,#weglot-url-translate select,#weglot-url-translate #type_flags,#wrap-weglot .weglot-select.weglot-select-original,#wrap-weglot input[type="text"],#wrap-weglot textarea,#wrap-weglot select,#wrap-weglot #type_flags{padding:0 8px;border-radius:4px;border:1px solid #7e8993}#weglot-url-translate .weglot-select.weglot-select-original:focus,#weglot-url-translate input[type="text"]:focus,#weglot-url-translate textarea:focus,#weglot-url-translate select:focus,#weglot-url-translate #type_flags:focus,#wrap-weglot .weglot-select.weglot-select-original:focus,#wrap-weglot input[type="text"]:focus,#wrap-weglot textarea:focus,#wrap-weglot select:focus,#wrap-weglot #type_flags:focus{border-color:#446dea !important;-webkit-box-shadow:none !important;box-shadow:none !important}#weglot-url-translate .weglot-info,#wrap-weglot .weglot-info{position:relative;color:#3741cc;font-weight:bold}#weglot-url-translate .weglot-info:hover .wg-tooltip,#wrap-weglot .weglot-info:hover .wg-tooltip{line-height:1.4;position:absolute;top:27px;display:block !important;background-color:#24292d;width:160px;padding:10px;color:white;font-weight:normal;border:1px solid #e0e0e0;font-size:12px}#weglot-url-translate .weglot-box-overlay,#wrap-weglot .weglot-box-overlay{position:fixed;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%;background-color:rgba(0,0,0,0.85);z-index:9999;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}#weglot-url-translate .weglot-box-overlay .weglot-box,#wrap-weglot .weglot-box-overlay .weglot-box{background-color:#fff;padding:25px;text-align:center;-webkit-box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75);box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75)}#weglot-url-translate .weglot-box-overlay .weglot-box--title,#wrap-weglot .weglot-box-overlay .weglot-box--title{font-size:24px;line-height:1.3}#weglot-url-translate .weglot-box-overlay .weglot-box--text,#wrap-weglot .weglot-box-overlay .weglot-box--text{font-size:18px}#weglot-url-translate .weglot-box-overlay .weglot-box--subtext,#wrap-weglot .weglot-box-overlay .weglot-box--subtext{font-size:12px;font-style:italic}#weglot-url-translate .weglot-box-overlay .weglot-btn-close,#wrap-weglot .weglot-box-overlay .weglot-btn-close{float:right;cursor:pointer}#weglot-url-translate .flag-style-openclose,#wrap-weglot .flag-style-openclose{display:inline-block;font-size:12px;text-decoration:underline;cursor:default;margin:12px 15px 0 10px;color:#46b450}#weglot-url-translate .flag-style-openclose:hover,#wrap-weglot .flag-style-openclose:hover{color:#399648;cursor:pointer}#weglot-url-translate .flag-style-wrapper,#wrap-weglot .flag-style-wrapper{padding:15px 0px}#weglot-url-translate .flag-style-wrapper p,#wrap-weglot .flag-style-wrapper p{font-size:12px !important}#weglot-url-translate .flag-style-wrapper select,#wrap-weglot .flag-style-wrapper select{font-size:12px;margin:0 2px 6px 0;padding:0 26px 0 8px}#weglot-url-translate #private_mode+p+div,#wrap-weglot #private_mode+p+div{display:none}#weglot-url-translate #private_mode:checked+p+div,#wrap-weglot #private_mode:checked+p+div{display:block}#weglot-url-translate #private-mode-detail,#wrap-weglot #private-mode-detail{margin-top:20px}#weglot-url-translate #private-mode-detail .private-mode-detail-lang,#wrap-weglot #private-mode-detail .private-mode-detail-lang{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:10px;margin-left:25px}#weglot-url-translate #private-mode-detail .private-mode-detail-lang input[type="checkbox"],#wrap-weglot #private-mode-detail .private-mode-detail-lang input[type="checkbox"]{margin-top:-1px}#wrap-weglot{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:15px}#wrap-weglot .wrap{-webkit-box-flex:4;-ms-flex:4;flex:4}#wrap-weglot input[type="text"]:not(#destination_language-selectized),#wrap-weglot input[type="url"]{padding:0 8px;height:36px}#wrap-weglot select{height:36px;vertical-align:top;border-radius:4px;padding:0 26px 0 8px}#wrap-weglot input[type="checkbox"]{margin-top:-4px}#wrap-weglot .weglot-ckeckkey:before{content:"\21BB";display:inline-block;color:#666;padding:0 6px 0 0;font-size:16px;padding:0 10px;line-height:1em;-webkit-animation:spin 2s infinite linear}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}#wrap-weglot .weglot-nokkey:before{content:"\274C";display:inline-block;color:#dc3232;padding:0 6px 0 0;font-size:15px;padding:0 10px}#wrap-weglot .weglot-okkey:before{content:"\2713";display:inline-block;color:#46b450;padding:0 10px;font-size:20px;font-weight:bold;padding:0 10px}#wrap-weglot .weglot-infobox{-webkit-box-flex:2;-ms-flex:2;flex:2;-ms-flex-item-align:start;align-self:start;margin:10px 20px 0 2px;background-color:white;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden}#wrap-weglot .weglot-infobox h3{color:#18164c;background-color:white;padding:30px 30px 0 30px;margin:0px;font-size:23px;line-height:1.3}#wrap-weglot .weglot-infobox div{padding:15px 30px 30px 30px}#wrap-weglot .weglot-infobox .weglot-editbtn{-webkit-box-shadow:0 2px 4px 0 rgba(1,1,2,0.05);box-shadow:0 2px 4px 0 rgba(1,1,2,0.05);background-color:#3d46fb;color:#fff;height:45px;border-radius:23px;line-height:45px;font-size:14px !important;text-decoration:none;padding:0 30px;display:inline-block;-webkit-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;transition:all 0.2s ease-in}#wrap-weglot .weglot-infobox .weglot-editbtn:hover{color:white;background:#252ed7}#wrap-weglot input[type="text"],#wrap-weglot .selectize-control,#wrap-weglot .wg-input-textarea,#wrap-weglot .weglot-select-original{width:100%;max-width:320px}#wrap-weglot #submit{height:50px;padding:0 30px !important;font-size:16px}#wrap-weglot .description{display:inline}#wrap-weglot .wg-tooltip{position:absolute;display:none}#wrap-weglot #mainform{margin-bottom:50px}#wrap-weglot .arrow-up{width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #24292d;position:absolute;top:-10px;left:36px}#wrap-weglot .question-icon{font-size:17px}#wrap-weglot .form-table{margin-bottom:50px}#wrap-weglot .country-selector{z-index:1 !important}#weglot-url-translate .weglot_custom_url{border-bottom:1px solid #ccc;margin-bottom:20px;padding-bottom:10px}#weglot-url-translate .weglot_custom_url a{margin:5px 0px;display:inline-block}#weglot-url-translate .weglot_custom_url--text_link{margin-bottom:4px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link input[type="text"]{min-height:24px !important;height:24px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link button{margin-top:-2px;font-size:11px;padding:0 8px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link button.button-weglot-lang .dashicons{font-size:14px;line-height:21px;margin-right:-3px;margin-left:-4px}#weglot-url-translate .weglot_custom_url a.weglot_reset{text-decoration:none}#weglot-url-translate .weglot_custom_url a.weglot_reset:link,#weglot-url-translate .weglot_custom_url a.weglot_reset:visited,#weglot-url-translate .weglot_custom_url a.weglot_reset:hover,#weglot-url-translate .weglot_custom_url a.weglot_reset:active{text-decoration:none}
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: translate, multilingual, language, translation, localization, multilingual
4
  Requires at least: 4.5
5
  Tested up to: 6.0
6
  Requires PHP: 5.6
7
- Stable tag: 3.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,14 +193,14 @@ For example, if your website is website.com, then the French version would be we
193
 
194
  == Screenshots ==
195
 
196
- 1. Translate your website in minutes, no code needed
197
- 2. Collaborate with your team or professional translators
198
- 3. Manage all your translations inside one simple dashboard
199
- 4. Drive new visitors to your website with multilingual SEO optimized translated pages
200
- 5. Redirect your visitors to their preferred language
201
- 6. Save time in your translation management process
202
- 7. Customize your language switcher to fit your website design
203
- 8. Join thousands of global brands trusting Weglot to translate their website
204
 
205
 
206
  == Upgrade Notice ==
@@ -210,16 +210,11 @@ See changelog for upgrade changes.
210
 
211
  == Changelog ==
212
 
213
- = 3.8 (11/10/2022) =
214
- * Add: Add ajax checker for woocommerce variations cart popin
215
- * Add: Rework switcher. Generate it direclty on render method
216
- * Add: Add vary header accept language on redirect
217
- * Bug: Fix rtl issue
218
- * Bug: Add missing ; on pageviews script
219
- * Bug: Send code lang instead of name for wp search query
220
- * Bug: Don't translate pdf on original language (woocommerce PDF invoice plugin)
221
- * Bug: Prevent add twice weglot_language post meta on woocommerce order
222
- * Bug: Prevent block translate if ajax referer are not exclude
223
 
224
  = Older versions =
225
 
4
  Requires at least: 4.5
5
  Tested up to: 6.0
6
  Requires PHP: 5.6
7
+ Stable tag: 3.8.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
193
 
194
  == Screenshots ==
195
 
196
+ 1. Become visible on search engines with multilingual SEO
197
+ 2. Edit translations easily with the visual editor
198
+ 3. Integrate Weglot with your WordPress website and get started instantly
199
+ 4. Create your translation team and collaborate with members
200
+ 5. Customize your language switcher for your website and brand
201
+ 6. Get full editing control with machine, human and pro translation options
202
+ 7. Join +60k brand going multilingual with Weglot
203
+ 8. Create translation rules and avoid repetitive editing tasks
204
 
205
 
206
  == Upgrade Notice ==
210
 
211
  == Changelog ==
212
 
213
+ = 3.8.1 (18/10/2022) =
214
+ * Bug: Default is_rtl value for custom_languages
215
+ * Bug: Update render button for gutenberg editor
216
+ * Bug: Improve UI for adding excluded block
217
+ * Add: Update assets for wordpress.org
 
 
 
 
 
218
 
219
  = Older versions =
220
 
src/actions/class-register-widget-weglot.php CHANGED
@@ -58,8 +58,12 @@ class Register_Widget_Weglot implements Hooks_Interface_Weglot {
58
 
59
  if ( 'widget' === $type_block ) {
60
  $button = $button_service->get_html( 'weglot-widget weglot-widget-block' );
 
 
61
  } elseif ( 'menu' === $type_block ) {
62
  $button = $button_service->get_html( 'weglot-menu weglot-menu-block' );
 
 
63
  }
64
 
65
  return $button;
58
 
59
  if ( 'widget' === $type_block ) {
60
  $button = $button_service->get_html( 'weglot-widget weglot-widget-block' );
61
+ $button = str_replace('name="menu" ', 'name="menu" value=""', $button);
62
+ $button = str_replace('data-wg-notranslate=""', '', $button);
63
  } elseif ( 'menu' === $type_block ) {
64
  $button = $button_service->get_html( 'weglot-menu weglot-menu-block' );
65
+ $button = str_replace('name="menu" ', 'name="menu" value=""', $button);
66
+ $button = str_replace('data-wg-notranslate=""', '', $button);
67
  }
68
 
69
  return $button;
src/services/class-language-service-weglot.php CHANGED
@@ -119,7 +119,7 @@ class Language_Service_Weglot {
119
  foreach ( $destination_languages as $d ) {
120
  $language_data = $this->languages->getCode( $d['language_to'] );
121
  if ( ! $language_data ) {
122
- $this->languages = $this->add_language( $d['language_to'], $d['custom_code'], $d['custom_name'], $d['custom_local_name'], $language_data->isRtl() );
123
  } else {
124
  $external_code = isset( $d['custom_code'] ) ? $d['custom_code'] : $language_data->getExternalCode();
125
  $custom_local_name = isset( $d['custom_name'] ) ? $d['custom_name'] : $language_data->getLocalName(); // TODO: remove after core fixes bug.
119
  foreach ( $destination_languages as $d ) {
120
  $language_data = $this->languages->getCode( $d['language_to'] );
121
  if ( ! $language_data ) {
122
+ $this->languages = $this->add_language( $d['language_to'], $d['custom_code'], $d['custom_name'], $d['custom_local_name'] );
123
  } else {
124
  $external_code = isset( $d['custom_code'] ) ? $d['custom_code'] : $language_data->getExternalCode();
125
  $custom_local_name = isset( $d['custom_name'] ) ? $d['custom_name'] : $language_data->getLocalName(); // TODO: remove after core fixes bug.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit13bf7c2aa976145ea50a03f1d032bd06::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit753bf99e8a5ed4ce5a7a253c0afabbbf::getLoader();
vendor/composer/InstalledVersions.php CHANGED
@@ -30,7 +30,7 @@ private static $installed = array (
30
  'aliases' =>
31
  array (
32
  ),
33
- 'reference' => '55907df54ca367d3e146074cedc8a0a86980c2fc',
34
  'name' => 'weglot/translate-wordpress',
35
  ),
36
  'versions' =>
@@ -69,7 +69,7 @@ private static $installed = array (
69
  'aliases' =>
70
  array (
71
  ),
72
- 'reference' => '55907df54ca367d3e146074cedc8a0a86980c2fc',
73
  ),
74
  'weglot/translation-definitions' =>
75
  array (
30
  'aliases' =>
31
  array (
32
  ),
33
+ 'reference' => '62e0e7596e7c037102987515cefbb74c2a941253',
34
  'name' => 'weglot/translate-wordpress',
35
  ),
36
  'versions' =>
69
  'aliases' =>
70
  array (
71
  ),
72
+ 'reference' => '62e0e7596e7c037102987515cefbb74c2a941253',
73
  ),
74
  'weglot/translation-definitions' =>
75
  array (
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit13bf7c2aa976145ea50a03f1d032bd06
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit13bf7c2aa976145ea50a03f1d032bd06
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit13bf7c2aa976145ea50a03f1d032bd06', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit13bf7c2aa976145ea50a03f1d032bd06', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit13bf7c2aa976145ea50a03f1d032bd06::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,19 +53,19 @@ class ComposerAutoloaderInit13bf7c2aa976145ea50a03f1d032bd06
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInit13bf7c2aa976145ea50a03f1d032bd06::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequire13bf7c2aa976145ea50a03f1d032bd06($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
- function composerRequire13bf7c2aa976145ea50a03f1d032bd06($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit753bf99e8a5ed4ce5a7a253c0afabbbf
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit753bf99e8a5ed4ce5a7a253c0afabbbf', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit753bf99e8a5ed4ce5a7a253c0afabbbf', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit753bf99e8a5ed4ce5a7a253c0afabbbf::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInit753bf99e8a5ed4ce5a7a253c0afabbbf::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequire753bf99e8a5ed4ce5a7a253c0afabbbf($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequire753bf99e8a5ed4ce5a7a253c0afabbbf($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit13bf7c2aa976145ea50a03f1d032bd06
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
@@ -66,10 +66,10 @@ class ComposerStaticInit13bf7c2aa976145ea50a03f1d032bd06
66
  public static function getInitializer(ClassLoader $loader)
67
  {
68
  return \Closure::bind(function () use ($loader) {
69
- $loader->prefixLengthsPsr4 = ComposerStaticInit13bf7c2aa976145ea50a03f1d032bd06::$prefixLengthsPsr4;
70
- $loader->prefixDirsPsr4 = ComposerStaticInit13bf7c2aa976145ea50a03f1d032bd06::$prefixDirsPsr4;
71
- $loader->prefixesPsr0 = ComposerStaticInit13bf7c2aa976145ea50a03f1d032bd06::$prefixesPsr0;
72
- $loader->classMap = ComposerStaticInit13bf7c2aa976145ea50a03f1d032bd06::$classMap;
73
 
74
  }, null, ClassLoader::class);
75
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit753bf99e8a5ed4ce5a7a253c0afabbbf
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
66
  public static function getInitializer(ClassLoader $loader)
67
  {
68
  return \Closure::bind(function () use ($loader) {
69
+ $loader->prefixLengthsPsr4 = ComposerStaticInit753bf99e8a5ed4ce5a7a253c0afabbbf::$prefixLengthsPsr4;
70
+ $loader->prefixDirsPsr4 = ComposerStaticInit753bf99e8a5ed4ce5a7a253c0afabbbf::$prefixDirsPsr4;
71
+ $loader->prefixesPsr0 = ComposerStaticInit753bf99e8a5ed4ce5a7a253c0afabbbf::$prefixesPsr0;
72
+ $loader->classMap = ComposerStaticInit753bf99e8a5ed4ce5a7a253c0afabbbf::$classMap;
73
 
74
  }, null, ClassLoader::class);
75
  }
vendor/composer/installed.php CHANGED
@@ -6,7 +6,7 @@
6
  'aliases' =>
7
  array (
8
  ),
9
- 'reference' => '55907df54ca367d3e146074cedc8a0a86980c2fc',
10
  'name' => 'weglot/translate-wordpress',
11
  ),
12
  'versions' =>
@@ -45,7 +45,7 @@
45
  'aliases' =>
46
  array (
47
  ),
48
- 'reference' => '55907df54ca367d3e146074cedc8a0a86980c2fc',
49
  ),
50
  'weglot/translation-definitions' =>
51
  array (
6
  'aliases' =>
7
  array (
8
  ),
9
+ 'reference' => '62e0e7596e7c037102987515cefbb74c2a941253',
10
  'name' => 'weglot/translate-wordpress',
11
  ),
12
  'versions' =>
45
  'aliases' =>
46
  array (
47
  ),
48
+ 'reference' => '62e0e7596e7c037102987515cefbb74c2a941253',
49
  ),
50
  'weglot/translation-definitions' =>
51
  array (
weglot.php CHANGED
@@ -7,7 +7,7 @@ Author: Weglot Translate team
7
  Author URI: https://weglot.com/
8
  Text Domain: weglot
9
  Domain Path: /languages/
10
- Version: 3.8
11
  */
12
 
13
  /**
@@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
22
  define( 'WEGLOT_NAME', 'Weglot' );
23
  define( 'WEGLOT_SLUG', 'weglot-translate' );
24
  define( 'WEGLOT_OPTION_GROUP', 'group-weglot-translate' );
25
- define( 'WEGLOT_VERSION', '3.8' );
26
  define( 'WEGLOT_PHP_MIN', '5.6' );
27
  define( 'WEGLOT_BNAME', plugin_basename( __FILE__ ) );
28
  define( 'WEGLOT_DIR', __DIR__ );
7
  Author URI: https://weglot.com/
8
  Text Domain: weglot
9
  Domain Path: /languages/
10
+ Version: 3.8.1
11
  */
12
 
13
  /**
22
  define( 'WEGLOT_NAME', 'Weglot' );
23
  define( 'WEGLOT_SLUG', 'weglot-translate' );
24
  define( 'WEGLOT_OPTION_GROUP', 'group-weglot-translate' );
25
+ define( 'WEGLOT_VERSION', '3.8.1' );
26
  define( 'WEGLOT_PHP_MIN', '5.6' );
27
  define( 'WEGLOT_BNAME', plugin_basename( __FILE__ ) );
28
  define( 'WEGLOT_DIR', __DIR__ );