-
Erick Hitter authored424b16ff
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
classic-editor.js 1.12 KiB
!function(){"use strict";var t,e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},n=window.jQuery;(t=e.n(n)())(document).ready((function(){const e=t("#"+wp_revisions_control.namespace+" .button.purge");let n=null,o=null;function r(o){if(o.error)alert(o.error),t(e).text(n);else if(o.success){const n=t("ul.post-revisions > li");t(n).each((function(){t(this).text().match(wp_revisions_control.autosave)||t(this).slideUp("slow").remove()})),t(e).fadeOut("slow").after(wp_revisions_control.nothing_text)}}function s(){alert(wp_revisions_control.error),t(e).text(n)}n=t(e).text(),t(e).on("click",(function(){o=parseInt(t(this).data("postid")),t(e).text(wp_revisions_control.processing_text),confirm(wp_revisions_control.ays)&&o?t.ajax({url:ajaxurl,cache:!1,data:{action:wp_revisions_control.action_base+"_purge",post_id:o,nonce:t(this).data("nonce")},type:"post",dataType:"json",success:r,error:s}):t(e).text(n)}))}))}();