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
polylang / js / build / user.min.js

user.min.js in Polylang trunk, at js/build/user.min.js

1 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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();