WordPress/wp-admin/js/post.min.js

2 lines
19 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
window.makeSlugeditClickable=window.editPermalink=function(){},window.wp=window.wp||{},function(s){var t=!1,a=wp.i18n.__;window.commentsBox={st:0,get:function(t,e){var i=this.st;return this.st+=e=e||20,this.total=t,s("#commentsdiv .spinner").addClass("is-active"),e={action:"get-comments",mode:"single",_ajax_nonce:s("#add_comment_nonce").val(),p:s("#post_ID").val(),start:i,number:e},s.post(ajaxurl,e,function(t){return t=wpAjax.parseAjaxResponse(t),s("#commentsdiv .widefat").show(),s("#commentsdiv .spinner").removeClass("is-active"),"object"==typeof t&&t.responses[0]?(s("#the-comment-list").append(t.responses[0].data),theList=theExtraList=null,s("a[className*=':']").off(),void(commentsBox.st>commentsBox.total?s("#show-comments").hide():s("#show-comments").show().children("a").text(a("Show more comments")))):void(1!=t?s("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>"):s("#show-comments").text(a("No more comments found.")))}),!1},load:function(t){this.st=jQuery("#the-comment-list tr.comment:visible").length,this.get(t)}},window.WPSetThumbnailHTML=function(t){s(".inside","#postimagediv").html(t)},window.WPSetThumbnailID=function(t){var e=s('input[value="_thumbnail_id"]',"#list-table");0<e.length&&s("#meta\\["+e.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(t)},window.WPRemoveThumbnail=function(t){s.post(ajaxurl,{action:"set-post-thumbnail",post_id:s("#post_ID").val(),thumbnail_id:-1,_ajax_nonce:t,cookie:encodeURIComponent(document.cookie)},function(t){"0"==t?alert(a("Could not set that as the thumbnail image. Try a different attachment.")):WPSetThumbnailHTML(t)})},s(document).on("heartbeat-send.refresh-lock",function(t,e){var i=s("#active_post_lock").val(),a=s("#post_ID").val(),n={};a&&s("#post-lock-dialog").length&&(n.post_id=a,i&&(n.lock=i),e["wp-refresh-post-lock"]=n)}).on("heartbeat-tick.refresh-lock",function(t,e){var i,a;e["wp-refresh-post-lock"]&&((i=e["wp-refresh-post-lock"]).lock_error?(a=s("#post-lock-dialog")).length&&!a.is(":visible")&&(wp.autosave&&(s(document).one("heartbeat-tick",function(){wp.autosave.server.suspend(),a.removeClass("saving").addClass("saved"),s(window).off("beforeunload.edit-post")}),a.addClass("saving"),wp.autosave.server.triggerSave()),i.lock_error.avatar_src&&(e=s("<img />",{class:"avatar avatar-64 photo",width:64,height:64,alt:"",src:i.lock_error.avatar_src,srcset:i.lock_error.avatar_src_2x?i.lock_error.avatar_src_2x+" 2x":void 0}),a.find("div.post-locked-avatar").empty().append(e)),a.show().find(".currently-editing").text(i.lock_error.text),a.find(".wp-tab-first").trigger("focus")):i.new_lock&&s("#active_post_lock").val(i.new_lock))}).on("before-autosave.update-post-slug",function(){t=document.activeElement&&"title"===document.activeElement.id}).on("after-autosave.update-post-slug",function(){s("#edit-slug-box > *").length||t||s.post(ajaxurl,{action:"sample-permalink",post_id:s("#post_ID").val(),new_title:s("#title").val(),samplepermalinknonce:s("#samplepermalinknonce").val()},function(t){"-1"!=t&&s("#edit-slug-box").html(t)})})}(jQuery),function(n){var s,t;function i(){s=!1,window.clearTimeout(t),t=window.setTimeout(function(){s=!0},3e5)}n(document).on("heartbeat-send.wp-refresh-nonces",function(t,e){var i,a=n("#wp-auth-check-wrap");(s||a.length&&!a.hasClass("hidden"))&&(i=n("#post_ID").val())&&n("#_wpnonce").val()&&(e["wp-refresh-post-nonces"]={post_id:i})}).on("heartbeat-tick.wp-refresh-nonces",function(t,e){e=e["wp-refresh-post-nonces"];e&&(i(),e.replace&&n.each(e.replace,function(t,e){n("#"+t).val(e)}),e.heartbeatNonce&&(window.heartbeatSettings.nonce=e.heartbeatNonce))}).ready(function(){i()})}(jQuery),jQuery(document).ready(function(u){var p,e,i,a,n,s,o,l,r,t,c,d,h=u("#content"),f=u(document),v=u("#post_ID").val()||0,m=u("#submitpost"),g=!0,w=u("#post-visibility-select"),b=u("#timestampdiv"),k=u("#post-status-select"),_=!!window.navigator.platform&&-1!==window.navigator.platform.indexOf("Mac"),y=new ClipboardJS(".copy-attachment-url.edit-media"),x=wp.i18n.__,C=wp.i18n._x;function D(t){c.hasClass("wp-editor-expand")||(r?o.theme.resizeTo(null,l+t.pa