文件操作 - gutenberg.min.js
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/stanleysteamer/public_html/wp-content/themes/bricks/assets/js/gutenberg.min.js
编辑文件内容
function bricksGetGutenbergBricksData(){if(window.bricksData)return window.bricksData;if(window.self!==window.top)try{if(window.parent&&window.parent.bricksData)return window.parent.bricksData}catch(t){}}function bricksGetGutenbergPayload(){if(window.bricksGutenbergData)return window.bricksGutenbergData;if(window.self!==window.top)try{if(window.parent&&window.parent.bricksGutenbergData)return window.parent.bricksGutenbergData}catch(t){}}function bricksGetBuilderRedirectUrl(){const t=bricksGetGutenbergPayload()?.builderEditLink;if(!t||"#"===t)return"";try{const e=new URL(t,window.location.origin);return["http:","https:"].includes(e.protocol)?e.href:""}catch(t){return""}}function bricksAdminGutenbergEditWithBricks(){if(window.self===window.top){var t=document.querySelector("#wp-admin-bar-edit_with_bricks a");t||((t=document.createElement("a")).id="wp-admin-bar-edit_with_bricks",t.href=window.bricksGutenbergData.builderEditLink,t.innerText=window.bricksData.i18n.editWithBricks),window.wp.data.subscribe(function(){setTimeout(function(){var e=document.querySelector(".edit-post-header-toolbar");if(e&&e instanceof HTMLElement&&!e.querySelector("#toolbar-edit_with_bricks")){var i=document.createElement("a");i.id="toolbar-edit_with_bricks",i.classList.add("button"),i.classList.add("button-primary"),i.innerText=t.innerText,i.href=t.href,e.append(i),i.addEventListener("click",function(t){t.preventDefault();var e=window.wp.data.select("core/editor").getEditedPostAttribute("title"),i=window.wp.data.select("core/editor").getCurrentPostId();e||window.wp.data.dispatch("core/editor").editPost({title:"Bricks #"+i}),window.wp.data.dispatch("core/editor").savePost();var n=function(t){setTimeout(function(){window.wp.data.select("core/editor").isSavingPost()||window.wp.data.select("core/editor").isAutosavingPost()?n(t):window.location.href=t},400)};n(t.target.href)})}},1)})}}function bricksHandleEmptyContent(){let t=document.querySelector(".is-root-container"),e=0;!function i(){if(!(e>=10)){if(t=document.querySelector(".is-root-container"),!t)return e++,void setTimeout(i,50);if(window.self!==window.top)window.wp&&window.wp.data?window.wp.data.subscribe(function(){setTimeout(function(){handleEmptyContentCore(t)},1)}):handleEmptyContentCore(t);else{!document.querySelector('iframe[name="editor-canvas"]')&&window.wp&&window.wp.data&&window.wp.data.subscribe(function(){setTimeout(function(){handleEmptyContentCore(t)},1)})}}}()}function handleEmptyContentCore(t){const e=bricksGetGutenbergBricksData(),i=bricksGetGutenbergPayload();if(t&&!t.querySelector(".bricks-block-editor-notice-wrapper")&&1==e?.renderWithBricks&&(e?.hasBricksData||e?.contentTemplateId)&&!window.useDefaultEditor){t.querySelectorAll(":scope > *").forEach(t=>{t.classList.contains("bricks-block-editor-notice-wrapper")||(t.style.display="none")});const n=document.createElement("div");n.className="bricks-block-editor-notice-wrapper";const o=document.createElement("p");o.className="bricks-editor-message",e.contentTemplateId&&e.contentTemplateName?o.textContent=e.i18n.bricksTemplateMessage.replace("%s",e.contentTemplateName):o.textContent=e.i18n.bricksActiveMessage;const r=document.createElement("div");r.className="bricks-editor-buttons";const d=document.createElement("a");d.className="button button-primary",d.href=i?.builderEditLink||"#",d.textContent=e.i18n.editWithBricks,d.addEventListener("click",t=>{if(t.preventDefault(),window.self!==window.top)window.top.postMessage({type:"bricksOpenBuilder",url:i?.builderEditLink||""},"*");else if(window.wp&&window.wp.data){const t=window.wp.data.select("core/editor").getCurrentPostId(),e=window.wp.data.select("core/editor").getEditedPostAttribute("title"),n=i?.builderEditLink||d.href;e||window.wp.data.dispatch("core/editor").editPost({title:"Bricks #"+t}),window.wp.data.dispatch("core/editor").savePost();const o=()=>{setTimeout(()=>{if(window.wp.data.select("core/editor").isSavingPost()||window.wp.data.select("core/editor").isAutosavingPost())o();else{if(!n||"#"===n)return;window.location.href=n}},400)};o()}else window.location.href=i?.builderEditLink||"#"});const a=document.createElement("a");a.className="button",a.href="#",a.textContent=e.i18n.useDefaultEditor,a.addEventListener("click",e=>{e.preventDefault(),window.useDefaultEditor=!0,t.querySelectorAll(":scope > *").forEach(t=>{t.classList.contains("bricks-block-editor-notice-wrapper")||(t.style.display="")}),n.remove()}),r.append(d,a),n.append(o,r),t.appendChild(n)}}window.self===window.top&&window.addEventListener("message",t=>{if(t.origin!==window.location.origin||"bricksOpenBuilder"!==t.data?.type)return;const e=document.querySelector('iframe[name="editor-canvas"]');if(!e||t.source!==e.contentWindow)return;const i=bricksGetBuilderRedirectUrl();if(i)if(window.wp&&window.wp.data){const t=window.wp.data.select("core/editor").getCurrentPostId();window.wp.data.select("core/editor").getEditedPostAttribute("title")||window.wp.data.dispatch("core/editor").editPost({title:"Bricks #"+t}),window.wp.data.dispatch("core/editor").savePost();const e=()=>{setTimeout(()=>{window.wp.data.select("core/editor").isSavingPost()||window.wp.data.select("core/editor").isAutosavingPost()?e():window.location.href=i},400)};e()}else window.location.href=i}),document.addEventListener("DOMContentLoaded",function(t){bricksAdminGutenbergEditWithBricks(),bricksHandleEmptyContent()});
修改文件时间
将文件时间修改为当前时间的前一年
删除文件