Prep Plugin for release on WordPress.org (#23)

* Update translation text domain
* Escape everything that should be escaped.
* Add nonce checks where needed.
* Sanitize all inputs.
* Apply Code style changes across the codebase.
* Correct many deprecation notices.
* Optimize load order of many filters.
* Add Proper Build script
* Use emojii flags
* Fix i18n deprecation  notice for translating too early
* Put all scripts in footer and load async
This commit is contained in:
David Stone
2025-04-14 11:36:46 -06:00
committed by GitHub
parent a31cfcb565
commit d88e50df38
1087 changed files with 12586 additions and 18535 deletions

View File

@ -1 +1 @@
if(function(t){window._wu_block_ui_polyfill=wu_block_ui_polyfill,wu_block_ui_polyfill=function(){},t(document).ready((function(){t("#poststuff").on("submit","form",(function(n){n.preventDefault();const e=t(this),s=e.find("table[data-id]").data("id");e.find("[name=next]").attr("disabled","disabled");let i=e.find("tr[data-content]");i=i.filter((function(){const n=t(this).find("input[type=checkbox]");return!n.length||n.is(":checked")}));let a=0,d=0;!function n(l){if(window.onbeforeunload=function(){return""},0===l.length)return i.length!==a&&"migration"!==s||(window.onbeforeunload=null,_wu_block_ui_polyfill(t("#poststuff .inside")),setTimeout(()=>{e.get(0).submit()},100)),e.find("[name=next]").removeAttr("disabled"),!1;const o=t(l),u=o.data("content");o.get(0).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),o.find("td.status").attr("class","").addClass("status").find("> span").html(wu_setup[u].installing).end().find(".spinner").addClass("is-active").end().find("a.help").slideUp(),t.ajax({url:ajaxurl,method:"post",data:{action:"wu_setup_install",installer:u,"dry-run":wu_setup_settings.dry_run},success(t){!0===t.success?(o.find("td.status").attr("class","").addClass("status wu-text-green-600").find("> span").html(wu_setup[u].success).end().find(".spinner").removeClass("is-active"),o.removeAttr("data-content"),a++):o.find("td.status").attr("class","").addClass("status wu-text-red-400").find("> span").html(t.data[0].message).end().find(".spinner").removeClass("is-active").end().find("a.help").slideDown(),d++,n(i.eq(d))},error(){o.find("td.status").attr("class","").addClass("status wu-text-red-400").find("span").html("").end().find(".spinner").removeClass("is-active").end().find("a.help").slideDown(),d++,n(i.eq(d))}})}(i.eq(d))}))}))}(jQuery),"function"!=typeof wu_initialize_tooltip){const t=function(){jQuery('[role="tooltip"]').tipTip({attribute:"aria-label"})};jQuery(document).ready((function(){t()}))}
if((r=>{window._wu_block_ui_polyfill=wu_block_ui_polyfill,wu_block_ui_polyfill=function(){},r(document).ready(function(){r("#poststuff").on("submit","form",function(t){t.preventDefault();let s=r(this),a=s.find("table[data-id]").data("id"),d=(s.find("[name=next]").attr("disabled","disabled"),s.find("tr[data-content]")),l=(d=d.filter(function(){var t=r(this).find("input[type=checkbox]");return!t.length||t.is(":checked")}),0),o=0;!function e(t){window.onbeforeunload=function(){return""};if(0===t.length)return d.length!==l&&"migration"!==a||(window.onbeforeunload=null,_wu_block_ui_polyfill(r("#poststuff .inside")),setTimeout(()=>{s.get(0).submit()},100)),s.find("[name=next]").removeAttr("disabled"),!1;let n=r(t);let i=n.data("content");n.get(0).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});n.find("td.status").attr("class","").addClass("status").find("> span").html(wu_setup[i].installing).end().find(".spinner").addClass("is-active").end().find("a.help").slideUp();r.ajax({url:ajaxurl,method:"post",data:{action:"wu_setup_install",installer:i,"dry-run":wu_setup_settings.dry_run},success(t){!0===t.success?(n.find("td.status").attr("class","").addClass("status wu-text-green-600").find("> span").html(wu_setup[i].success).end().find(".spinner").removeClass("is-active"),n.removeAttr("data-content"),l++):n.find("td.status").attr("class","").addClass("status wu-text-red-400").find("> span").html(t.data[0].message).end().find(".spinner").removeClass("is-active").end().find("a.help").slideDown(),o++,e(d.eq(o))},error(){n.find("td.status").attr("class","").addClass("status wu-text-red-400").find("span").html("").end().find(".spinner").removeClass("is-active").end().find("a.help").slideDown(),o++,e(d.eq(o))}})}(d.eq(o))})})})(jQuery),"function"!=typeof wu_initialize_tooltip){let t=function(){jQuery('[role="tooltip"]').tipTip({attribute:"aria-label"})},e=function(t){return jQuery(t).wu_block({message:"<span>Please wait...</span>",overlayCSS:{backgroundColor:"#FFF",opacity:.6},css:{padding:0,margin:0,width:"50%",fontSize:"14px !important",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"none",backgroundColor:"none",cursor:"wait"}}),jQuery(t)};jQuery(document).ready(function(){t()})}