PluginProbe
Polylang / trunk
Polylang vtrunk
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | js/build/user.min.js +1 -1 3.0 → trunk View file →
@@ -1 +1 @@
1 -jQuery((function(e){var n=e("#description").parent(),i=e("#description").clone(),t=n.children(".description").clone();n.children().remove(),e(".biography").each((function(){lang=e(this).attr("name").split("___"),desc=i.clone(),desc.attr("name","description_"+lang[0]),desc.attr("id","description_"+lang[0]),desc.html(e(this).val()),n.append(e("<div></div>").text(lang[1])),n.append(desc)})),n.append("<br />"),n.append(t)}));
1 +const pllDescription={init:()=>{pllDescriptionData&&("loading"!==document.readyState?pllDescription.ready():document.addEventListener("DOMContentLoaded",pllDescription.ready))},ready:()=>{const t=document.getElementById("description");if(!t)return;const e=[];pllDescriptionData.forEach(i=>{const n=document.createElement("div");n.setAttribute("lang",i.lang);const r=document.createElement("label");if(r.setAttribute("for",`description_${i.slug}`),r.setAttribute("dir",i.direction),i.flag.src){const t=document.createElement("img");t.setAttribute("alt",""),t.setAttribute("src",i.flag.src),i.flag.width&&t.setAttribute("width",i.flag.width),i.flag.height&&t.setAttribute("height",i.flag.height),r.textContent=` ${i.name}`,r.prepend(t)}else r.textContent=i.name;const c=t.cloneNode(!0);c.setAttribute("id",`description_${i.slug}`),c.setAttribute("name",`description_${i.slug}`),c.setAttribute("dir",i.direction),c.innerHTML=i.description,n.append(r,document.createElement("br"),c),e.push(n)}),t.replaceWith(...e)}};pllDescription.init();