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 @@
!function(o){o(document).ready((function(){wu_log_payload=new Vue({el:"#wu_payload",data:()=>({payload:"",log:o("select[name=log_file]").val(),loading:!0}),watch:{log(){this.get_log_payload()}},methods:{get_log_payload(){const e=wu_block_ui("#wu_payload_content"),t=this;t.loading=!0,o.ajax({method:"post",url:ajaxurl,data:{action:"wu_handle_view_logs",file:t.log},success(o){t.payload=o.data.contents,t.loading=!1,e.unblock();try{history.pushState({},null,"?page=wp-ultimo-view-logs&log_file="+t.log)}catch(o){console.warn("Browser does not support pushState.",o)}}})}},mounted(){this.get_log_payload()}}),o(document).on("change","select[name=log_file]",(function(){wu_log_payload.log=o("select[name=log_file]").val()}));new ClipboardJS(".btn-clipboard").on("success",(function(e){const t=o(e.trigger),l=t.text();t.attr("disabled","disabled").text(wu_view_logs.i18n.copied),setTimeout((function(){t.text(l).removeAttr("disabled")}),3e3)}))}))}(jQuery);
(t=>{t(document).ready(function(){wu_log_payload=new Vue({el:"#wu_payload",data(){return{payload:"",log:t("select[name=log_file]").val(),loading:!0}},watch:{log(){this.get_log_payload()}},methods:{get_log_payload(){let o=wu_block_ui("#wu_payload_content"),l=this;l.loading=!0,t.ajax({method:"post",url:ajaxurl,data:{action:"wu_handle_view_logs",file:l.log},success(e){l.payload=e.data.contents,l.loading=!1,o.unblock();try{history.pushState({},null,"?page=wp-ultimo-view-logs&log_file="+l.log)}catch(e){console.warn("Browser does not support pushState.",e)}}})}},mounted(){this.get_log_payload()}}),t(document).on("change","select[name=log_file]",function(){wu_log_payload.log=t("select[name=log_file]").val()}),new ClipboardJS(".btn-clipboard").on("success",function(e){let o=t(e.trigger),l=o.text();o.attr("disabled","disabled").text(wu_view_logs.i18n.copied),setTimeout(function(){o.text(l).removeAttr("disabled")},3e3)})})})(jQuery);