You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
18 KiB

5 years ago
window.makeSlugeditClickable=window.editPermalink=function(){},window.wp=window.wp||{},function(a){var t=!1;window.commentsBox={st:0,get:function(t,e){var i,n=this.st;return e=e||20,this.st+=e,this.total=t,a("#commentsdiv .spinner").addClass("is-active"),i={action:"get-comments",mode:"single",_ajax_nonce:a("#add_comment_nonce").val(),p:a("#post_ID").val(),start:n,number:e},a.post(ajaxurl,i,function(t){if(t=wpAjax.parseAjaxResponse(t),a("#commentsdiv .widefat").show(),a("#commentsdiv .spinner").removeClass("is-active"),"object"==typeof t&&t.responses[0])return a("#the-comment-list").append(t.responses[0].data),theList=theExtraList=null,a("a[className*=':']").unbind(),void(commentsBox.st>commentsBox.total?a("#show-comments").hide():a("#show-comments").show().children("a").html(postL10n.showcomm));1!=t?a("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>"):a("#show-comments").html(postL10n.endcomm)}),!1},load:function(t){this.st=jQuery("#the-comment-list tr.comment:visible").length,this.get(t)}},window.WPSetThumbnailHTML=function(t){a(".inside","#postimagediv").html(t)},window.WPSetThumbnailID=function(t){var e=a('input[value="_thumbnail_id"]',"#list-table");0<e.length&&a("#meta\\["+e.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(t)},window.WPRemoveThumbnail=function(t){a.post(ajaxurl,{action:"set-post-thumbnail",post_id:a("#post_ID").val(),thumbnail_id:-1,_ajax_nonce:t,cookie:encodeURIComponent(document.cookie)},function(t){"0"==t?alert(setPostThumbnailL10n.error):WPSetThumbnailHTML(t)})},a(document).on("heartbeat-send.refresh-lock",function(t,e){var i=a("#active_post_lock").val(),n=a("#post_ID").val(),s={};n&&a("#post-lock-dialog").length&&(s.post_id=n,i&&(s.lock=i),e["wp-refresh-post-lock"]=s)}).on("heartbeat-tick.refresh-lock",function(t,e){var i,n,s;e["wp-refresh-post-lock"]&&((i=e["wp-refresh-post-lock"]).lock_error?(n=a("#post-lock-dialog")).length&&!n.is(":visible")&&(wp.autosave&&(a(document).one("heartbeat-tick",function(){wp.autosave.server.suspend(),n.removeClass("saving").addClass("saved"),a(window).off("beforeunload.edit-post")}),n.addClass("saving"),wp.autosave.server.triggerSave()),i.lock_error.avatar_src&&(s=a('<img class="avatar avatar-64 photo" width="64" height="64" alt="" />').attr("src",i.lock_error.avatar_src.replace(/&amp;/g,"&")),n.find("div.post-locked-avatar").empty().append(s)),n.show().find(".currently-editing").text(i.lock_error.text),n.find(".wp-tab-first").focus()):i.new_lock&&a("#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(){a("#edit-slug-box > *").length||t||a.post(ajaxurl,{action:"sample-permalink",post_id:a("#post_ID").val(),new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(t){"-1"!=t&&a("#edit-slug-box").html(t)})})}(jQuery),function(s){var a,t;function n(){a=!1,window.clearTimeout(t),t=window.setTimeout(function(){a=!0},3e5)}s(document).on("heartbeat-send.wp-refresh-nonces",function(t,e){var i,n=s("#wp-auth-check-wrap");(a||n.length&&!n.hasClass("hidden"))&&(i=s("#post_ID").val())&&s("#_wpnonce").val()&&(e["wp-refresh-post-nonces"]={post_id:i})}).on("heartbeat-tick.wp-refresh-nonces",function(t,e){var i=e["wp-refresh-post-nonces"];i&&(n(),i.replace&&s.each(i.replace,function(t,e){s("#"+t).val(e)}),i.heartbeatNonce&&(window.heartbeatSettings.nonce=i.heartbeatNonce))}).ready(function(){n()})}(jQuery),jQuery(document).ready(function(h){var d,e,i,n,s,a,o,l,t,p,c,r="",u=h("#content"),f=h(document),v=h("#post_ID").val()||0,m=h("#submitpost"),w=!0,b=h("#post-visibility-select"),g=h("#timestampdiv"),k=h("#post-status-select"),y=!!window.navigator.platform&&-1!==window.navigator.platform.indexOf("Mac");function _(t){p.hasClass("wp-editor-expand")||(l?a.theme.resizeTo(null,o+t.pageY):u.height(Math.max(50,o+t.pageY)),t.preventDefault())}function x(){var t,e;p.hasClass("wp-editor-expand")||(t=l?(a.focus(),((e=parseInt(h("#wp-content-editor-container .mce-toolbar-grp").height()