Version Description
Download this release
Release Info
Developer | gutenbergplugin |
Plugin | Gutenberg |
Version | 12.5.1 |
Comparing to | |
See all releases |
Code changes from version 12.5.0 to 12.5.1
- build/edit-site/index.js +3 -2
- build/edit-site/index.min.asset.php +1 -1
- build/edit-site/index.min.js +1 -1
- changelog.txt +240 -231
- gutenberg.php +3 -3
- readme.txt +2 -2
build/edit-site/index.js
CHANGED
@@ -2767,8 +2767,9 @@ function* setPage(page) {
|
|
2767 |
var _page$context;
|
2768 |
|
2769 |
if (!page.path && (_page$context = page.context) !== null && _page$context !== void 0 && _page$context.postId) {
|
2770 |
-
const entity = yield external_wp_data_namespaceObject.controls.resolveSelect(external_wp_coreData_namespaceObject.store, 'getEntityRecord', 'postType', page.context.postType || 'post', page.context.postId);
|
2771 |
-
|
|
|
2772 |
}
|
2773 |
|
2774 |
const {
|
2767 |
var _page$context;
|
2768 |
|
2769 |
if (!page.path && (_page$context = page.context) !== null && _page$context !== void 0 && _page$context.postId) {
|
2770 |
+
const entity = yield external_wp_data_namespaceObject.controls.resolveSelect(external_wp_coreData_namespaceObject.store, 'getEntityRecord', 'postType', page.context.postType || 'post', page.context.postId); // If the entity is undefined for some reason, path will resolve to "/"
|
2771 |
+
|
2772 |
+
page.path = (0,external_wp_url_namespaceObject.getPathAndQueryString)(entity === null || entity === void 0 ? void 0 : entity.link);
|
2773 |
}
|
2774 |
|
2775 |
const {
|
build/edit-site/index.min.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport'), 'version' => '6fc00025a7ce124f5dda7ff291997d9a');
|
build/edit-site/index.min.js
CHANGED
@@ -14,7 +14,7 @@ actions:(0,f.__)("Publish"),
|
|
14 |
/* translators: accessibility text for the footer landmark region. */
|
15 |
footer:(0,f.__)("Footer"),...m};return(0,o.createElement)("div",A({},_,{ref:(0,we.useMergeRefs)([t,_.ref]),className:B()(d,"interface-interface-skeleton",_.className,!!n&&"has-footer")}),!!c&&(0,o.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":g.drawer,tabIndex:"-1"},c),(0,o.createElement)("div",{className:"interface-interface-skeleton__editor"},!!r&&(0,o.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":g.header,tabIndex:"-1"},r),(0,o.createElement)("div",{className:"interface-interface-skeleton__body"},!!l&&(0,o.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":g.secondarySidebar,tabIndex:"-1"},l),!!i&&(0,o.createElement)("div",{className:"interface-interface-skeleton__notices"},i),(0,o.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":g.body,tabIndex:"-1"},s),!!a&&(0,o.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":g.sidebar,tabIndex:"-1"},a),!!u&&(0,o.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":g.actions,tabIndex:"-1"},u))),!!n&&(0,o.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":g.footer,tabIndex:"-1"},n))})),xe=window.wp.blockEditor,ke=window.wp.a11y;function Te(e){return!!e&&"custom"===(null==e?void 0:e.source)&&(null==e?void 0:e.has_theme_file)}function Ce(e){return{type:"TOGGLE_FEATURE",feature:e}}function Ie(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}function*Ne(e,t){const n={templateSlug:t};if(!t){const t=yield c.controls.resolveSelect(u.store,"getEntityRecord","postType","wp_template",e);n.templateSlug=null==t?void 0:t.slug}return{type:"SET_TEMPLATE",templateId:e,page:{context:n}}}function*Pe(e){const t=yield c.controls.dispatch(u.store,"saveEntityRecord","postType","wp_template",e);return e.content&&(yield c.controls.dispatch(u.store,"editEntityRecord","postType","wp_template",t.id,{blocks:(0,i.parse)(e.content)},{undoIgnore:!0})),{type:"SET_TEMPLATE",templateId:t.id,page:{context:{templateSlug:t.slug}}}}function*Me(e){try{yield c.controls.dispatch(u.store,"deleteEntityRecord","postType",e.type,e.id,{force:!0});const t=yield c.controls.select(u.store,"getLastEntityDeleteError","postType",e.type,e.id);if(t)throw t;yield c.controls.dispatch(R.store,"createSuccessNotice",(0,f.sprintf)(
|
16 |
/* translators: The template/part's name. */
|
17 |
-
(0,f.__)('"%s" deleted.'),e.title.rendered),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,f.__)("An error occurred while deleting the template.");yield c.controls.dispatch(R.store,"createErrorNotice",t,{type:"snackbar"})}}function Re(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function Ae(e){return{type:"SET_HOME_TEMPLATE",homeTemplateId:e}}function*Le(e){var t;if(!e.path&&null!==(t=e.context)&&void 0!==t&&t.postId){const t=yield c.controls.resolveSelect(u.store,"getEntityRecord","postType",e.context.postType||"post",e.context.postId);e.path=(0,p.getPathAndQueryString)(t.link)}const{id:n,slug:r}=yield c.controls.resolveSelect(u.store,"__experimentalGetTemplateForLink",e.path);return yield{type:"SET_PAGE",page:r?{...e,context:{...e.context,templateSlug:r}}:e,templateId:n},n}function Be(e){return{type:"SET_NAVIGATION_PANEL_ACTIVE_MENU",menu:e}}function Oe(e){return{type:"OPEN_NAVIGATION_PANEL_TO_MENU",menu:e}}function De(e){return{type:"SET_IS_NAVIGATION_PANEL_OPENED",isOpen:e}}function Fe(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function ze(e){return{type:"UPDATE_SETTINGS",settings:e}}function Ve(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}function*Ge(e){let{allowUndo:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Te(e))try{var n;const r=yield c.controls.select(u.store,"getEntity","postType",e.type);if(!r)return void(yield c.controls.dispatch(R.store,"createErrorNotice",(0,f.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const a=(0,p.addQueryArgs)(`${r.baseURL}/${e.id}`,{context:"edit",source:"theme"}),l=yield(0,h.apiFetch)({path:a});if(!l)return void(yield c.controls.dispatch(R.store,"createErrorNotice",(0,f.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const o=e=>{let{blocks:t=[]}=e;return(0,i.__unstableSerializeAndClean)(t)},s=yield c.controls.select(u.store,"getEditedEntityRecord","postType",e.type,e.id);yield c.controls.dispatch(u.store,"editEntityRecord","postType",e.type,e.id,{content:o,blocks:s.blocks,source:"custom"},{undoIgnore:!0});const m=(0,i.parse)(null==l||null===(n=l.content)||void 0===n?void 0:n.raw);if(yield c.controls.dispatch(u.store,"editEntityRecord","postType",e.type,l.id,{content:o,blocks:m,source:"theme"}),t){const t=async()=>{await(0,c.dispatch)(u.store).editEntityRecord("postType",e.type,s.id,{content:o,blocks:s.blocks,source:"custom"})};yield c.controls.dispatch(R.store,"createSuccessNotice",(0,f.__)("Template reverted."),{type:"snackbar",actions:[{label:(0,f.__)("Undo"),onClick:t}]})}else yield c.controls.dispatch(R.store,"createSuccessNotice",(0,f.__)("Template reverted."))}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,f.__)("Template revert failed. Please reload.");yield c.controls.dispatch(R.store,"createErrorNotice",t,{type:"snackbar"})}else yield c.controls.dispatch(R.store,"createErrorNotice",(0,f.__)("This template is not revertable."),{type:"snackbar"})}function*He(e){yield c.controls.dispatch(oe,"enableComplementaryArea",y,e)}function*Ue(){yield c.controls.dispatch(oe,"disableComplementaryArea",y)}function*We(e){yield{type:"SWITCH_MODE",mode:e},"visual"!==e&&(yield c.controls.dispatch(xe.store.name,"clearSelectedBlock"));const t={visual:(0,f.__)("Visual editor selected"),mosaic:(0,f.__)("Mosaic view selected")};t[e]&&(0,ke.speak)(t[e],"assertive")}function $e(e){return[e]}function je(){var e={clear:function(){e.head=null}};return e}function Ye(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function qe(e,t,n){return!!k[e]&&("home"===e&&"posts"!==n||k[e].every((e=>t.includes(e)||qe(e,t,n))))}function Xe(e,t){return(0,H.get)(e.preferences.features,[t],!1)}function Ke(e){return e.deviceType}ye={},ve="undefined"!=typeof WeakMap;const Qe=(0,c.createRegistrySelector)((e=>()=>e(u.store).canUser("create","media"))),Ze=(0,c.createRegistrySelector)((e=>()=>"web"===o.Platform.OS?e(u.store).getEntityRecords("postType","wp_block",{per_page:-1}):[])),Je=function(e,t){var n,r;function a(){n=ve?new WeakMap:je()}function l(){var n,a,l,o,i,s=arguments.length;for(o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];for(i=t.apply(null,o),(n=r(i)).isUniqueByDependants||(n.lastDependants&&!Ye(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),a=n.head;a;){if(Ye(a.args,o,1))return a!==n.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n.head,a.prev=null,n.head.prev=a,n.head=a),a.val;a=a.next}return a={val:e.apply(null,o)},o[0]=null,a.args=o,n.head&&(n.head.prev=a,a.next=n.head),n.head=a,a.val}return t||(t=$e),r=ve?function(e){var t,r,a,l,o,i=n,s=!0;for(t=0;t<e.length;t++){if(!(o=r=e[t])||"object"!=typeof o){s=!1;break}i.has(r)?i=i.get(r):(a=new WeakMap,i.set(r,a),i=a)}return i.has(ye)||((l=je()).isUniqueByDependants=s,i.set(ye,l)),i.get(ye)}:function(){return n},l.getDependants=t,l.clear=a,a(),l}(((e,t)=>{const n={...e.settings,outlineMode:!0,focusMode:Xe(e,"focusMode"),hasFixedToolbar:Xe(e,"fixedToolbar"),__experimentalSetIsInserterOpened:t,__experimentalReusableBlocks:Ze(e)};return Qe(e)?(n.mediaUpload=t=>{let{onError:n,...r}=t;(0,g.uploadMedia)({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:e=>{let{message:t}=e;return n(t)},...r})},n):n}),(e=>[Qe(e),e.settings,Xe(e,"focusMode"),Xe(e,"fixedToolbar"),Ze(e)]));function et(e){return e.homeTemplateId}function tt(e){return e.editedPost}function nt(e){return tt(e).type}function rt(e){return tt(e).id}function at(e){return tt(e).page}function lt(e){return e.navigationPanel.menu}const ot=(0,c.createRegistrySelector)((e=>t=>{const n=nt(t),r=rt(t),a=r?e(u.store).getEntityRecord("postType",n,r):null;if(!a)return T;var l;if("wp_template_part"===n)return(null===(l=N.find((e=>e.area===(null==a?void 0:a.area))))||void 0===l?void 0:l.menu)||"template-parts";const o=e(u.store).getEntityRecords("postType","wp_template"),i=e(u.store).getEditedEntityRecord("root","site").show_on_front;return qe(a.slug,(0,H.map)(o,"slug"),i)?"templates-unused":(s=a.slug,b.includes(s)?C:w.includes(s)?I:S.some((e=>s.startsWith(e)))?"templates-posts":x.some((e=>s.startsWith(e)))?"templates-pages":I);var s}));function it(e){return e.navigationPanel.isOpen}function st(e){return!!e.blockInserterPanel}function ct(e){const{rootClientId:t,insertionIndex:n,filterValue:r}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n,filterValue:r}}function ut(e){return e.listViewPanel}const mt=(0,c.createRegistrySelector)((e=>t=>{var n;const r=nt(t),a=rt(t),l=e(u.store).getEditedEntityRecord("postType",r,a),o=e(u.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),s=(0,H.keyBy)(o,(e=>e.id));return(null!==(n=l.blocks)&&void 0!==n?n:[]).filter((e=>(0,i.isTemplatePart)(e))).map((e=>{const{attributes:{theme:t,slug:n}}=e;return{templatePart:s[`${t}//${n}`],block:e}})).filter((e=>{let{templatePart:t}=e;return!!t}))}));function dt(e){return e.preferences.editorMode||"visual"}const pt={reducer:M,actions:a,selectors:l,controls:h.controls,persist:["preferences"]},_t=(0,c.createReduxStore)(y,pt);(0,c.registerStore)(y,pt);var gt,ht=gt||(gt={});ht.Pop="POP",ht.Push="PUSH",ht.Replace="REPLACE";function Et(e){e.preventDefault(),e.returnValue=""}function ft(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}const yt=function(e){function t(){var e=o.location,t=i.state||{};return[t.idx,{pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"}]}function n(e){return"string"==typeof e?e:function(e){var t=e.pathname,n=e.search;return(void 0===t?"/":t)+(void 0===n?"":n)+(void 0===(e=e.hash)?"":e)}(e)}function r(e,t){return void 0===t&&(t=null),A({pathname:m.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){c=e,e=t(),u=e[0],m=e[1],d.call({action:c,location:m})}function l(e){i.go(e)}void 0===e&&(e={});var o=void 0===(e=e.window)?document.defaultView:e,i=o.history,s=null;o.addEventListener("popstate",(function(){if(s)p.call(s),s=null;else{var e=gt.Pop,n=t(),r=n[0];if(n=n[1],p.length){if(null!=r){var o=u-r;o&&(s={action:e,location:n,retry:function(){l(-1*o)}},l(o))}}else a(e)}}));var c=gt.Pop,u=(e=t())[0],m=e[1],d=ft(),p=ft();return null==u&&(u=0,i.replaceState(A({},i.state,{idx:u}),"")),{get action(){return c},get location(){return m},createHref:n,push:function e(t,l){var s=gt.Push,c=r(t,l);if(!p.length||(p.call({action:s,location:c,retry:function(){e(t,l)}}),0)){var m=[{usr:c.state,key:c.key,idx:u+1},n(c)];c=m[0],m=m[1];try{i.pushState(c,"",m)}catch(e){o.location.assign(m)}a(s)}},replace:function e(t,l){var o=gt.Replace,s=r(t,l);p.length&&(p.call({action:o,location:s,retry:function(){e(t,l)}}),1)||(s=[{usr:s.state,key:s.key,idx:u},n(s)],i.replaceState(s[0],"",s[1]),a(o))},go:l,back:function(){l(-1)},forward:function(){l(1)},listen:function(e){return d.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&o.addEventListener("beforeunload",Et),function(){t(),p.length||o.removeEventListener("beforeunload",Et)}}}}(),vt=yt.push,bt=yt.replace;yt.push=function(e,t){return vt.call(yt,(0,p.addQueryArgs)(window.location.href,e),t)},yt.replace=function(e,t){return bt.call(yt,(0,p.addQueryArgs)(window.location.href,e),t)};var wt=yt;const St=(0,o.createContext)(),xt=(0,o.createContext)();function kt(){return(0,o.useContext)(St)}function Tt(){return(0,o.useContext)(xt)}function Ct(e){const t=new URLSearchParams(e.search);return{...e,params:Object.fromEntries(t.entries())}}function It(e){let{children:t}=e;const[n,r]=(0,o.useState)((()=>Ct(wt.location)));return(0,o.useEffect)((()=>wt.listen((e=>{let{location:t}=e;r(Ct(t))}))),[]),(0,o.createElement)(xt.Provider,{value:wt},(0,o.createElement)(St.Provider,{value:n},t(n)))}var Nt=window.wp.keyboardShortcuts,Pt=(0,o.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(D.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),Mt=(0,o.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(D.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"})),Rt=window.wp.keycodes,At=(0,o.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(D.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Lt=(0,o.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(D.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const Bt=[{keyCombination:{modifier:"primary",character:"b"},description:(0,f.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,f.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,f.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,f.__)("Remove a link.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,f.__)("Underline the selected text.")}];function Ot(e){let{keyCombination:t,forceAriaLabel:n}=e;const r=t.modifier?Rt.displayShortcutList[t.modifier](t.character):t.character,a=t.modifier?Rt.shortcutAriaLabel[t.modifier](t.character):t.character;return(0,o.createElement)("kbd",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":n||a},(0,H.castArray)(r).map(((e,t)=>"+"===e?(0,o.createElement)(o.Fragment,{key:t},e):(0,o.createElement)("kbd",{key:t,className:"edit-site-keyboard-shortcut-help-modal__shortcut-key"},e))))}function Dt(e){let{description:t,keyCombination:n,aliases:r=[],ariaLabel:a}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-description"},t),(0,o.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-term"},(0,o.createElement)(Ot,{keyCombination:n,forceAriaLabel:a}),r.map(((e,t)=>(0,o.createElement)(Ot,{keyCombination:e,forceAriaLabel:a,key:t})))))}function Ft(e){let{name:t}=e;const{keyCombination:n,description:r,aliases:a}=(0,c.useSelect)((e=>{const{getShortcutKeyCombination:n,getShortcutDescription:r,getShortcutAliases:a}=e(Nt.store);return{keyCombination:n(t),aliases:a(t),description:r(t)}}),[t]);return n?(0,o.createElement)(Dt,{keyCombination:n,description:r,aliases:a}):null}const zt=e=>{let{shortcuts:t}=e;return(0,o.createElement)("ul",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-list",role:"list"},t.map(((e,t)=>(0,o.createElement)("li",{className:"edit-site-keyboard-shortcut-help-modal__shortcut",key:t},(0,H.isString)(e)?(0,o.createElement)(Ft,{name:e}):(0,o.createElement)(Dt,e)))))},Vt=e=>{let{title:t,shortcuts:n,className:r}=e;return(0,o.createElement)("section",{className:B()("edit-site-keyboard-shortcut-help-modal__section",r)},!!t&&(0,o.createElement)("h2",{className:"edit-site-keyboard-shortcut-help-modal__section-title"},t),(0,o.createElement)(zt,{shortcuts:n}))},Gt=e=>{let{title:t,categoryName:n,additionalShortcuts:r=[]}=e;const a=(0,c.useSelect)((e=>e(Nt.store).getCategoryShortcuts(n)),[n]);return(0,o.createElement)(Vt,{title:t,shortcuts:a.concat(r)})};function Ht(e){let{isModalActive:t,toggleModal:n}=e;return t?(0,o.createElement)(O.Modal,{className:"edit-site-keyboard-shortcut-help-modal",title:(0,f.__)("Keyboard shortcuts"),closeLabel:(0,f.__)("Close"),onRequestClose:n},(0,o.createElement)(Vt,{className:"edit-site-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-site/keyboard-shortcuts"]}),(0,o.createElement)(Gt,{title:(0,f.__)("Global shortcuts"),categoryName:"global"}),(0,o.createElement)(Gt,{title:(0,f.__)("Selection shortcuts"),categoryName:"selection"}),(0,o.createElement)(Gt,{title:(0,f.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,f.__)("Change the block type after adding a new paragraph."),
|
18 |
/* translators: The forward-slash character. e.g. '/'. */
|
19 |
ariaLabel:(0,f.__)("Forward-slash")}]}),(0,o.createElement)(Vt,{title:(0,f.__)("Text formatting"),shortcuts:Bt})):null}function Ut(e){let{feature:t,label:n,info:r,messageActivated:a,messageDeactivated:l}=e;const i=(0,c.useSelect)((e=>e(_t).isFeatureActive(t)),[]),{toggleFeature:s}=(0,c.useDispatch)(_t);return(0,o.createElement)(O.MenuItem,{icon:i&&F,isSelected:i,onClick:(0,H.flow)(s.bind(null,t),(()=>{i?(0,ke.speak)(l||(0,f.__)("Feature deactivated")):(0,ke.speak)(a||(0,f.__)("Feature activated"))})),role:"menuitemcheckbox",info:r},n)}const{Fill:Wt,Slot:$t}=(0,O.createSlotFill)("EditSiteToolsMoreMenuGroup");Wt.Slot=e=>{let{fillProps:t}=e;return(0,o.createElement)($t,{fillProps:t},(e=>!(0,H.isEmpty)(e)&&e))};var jt=Wt,Yt=n(3729),qt=n.n(Yt),Xt=window.wp.apiFetch,Kt=n.n(Xt),Qt=(0,o.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(D.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"}));function Zt(){const{createErrorNotice:e}=(0,c.useDispatch)(R.store);return(0,o.createElement)(O.MenuItem,{role:"menuitem",icon:Qt,onClick:async function(){try{const e=await Kt()({path:"/wp-block-editor/v1/export",parse:!1}),t=await e.blob();qt()(t,"edit-site-export.zip","application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const r=n.message&&"unknown_error"!==n.code?n.message:(0,f.__)("An error occurred while creating the site export.");e(r,{type:"snackbar"})}},info:(0,f.__)("Download your templates and template parts.")},(0,f._x)("Export","site exporter menu item"))}function Jt(){const{toggleFeature:e}=(0,c.useDispatch)(_t);return(0,o.createElement)(O.MenuItem,{onClick:()=>e("welcomeGuide")},(0,f.__)("Welcome Guide"))}function en(){const{createNotice:e}=(0,c.useDispatch)(R.store),t=(0,c.useSelect)((e=>()=>{const{getEditedPostId:t,getEditedPostType:n}=e(_t),{getEditedEntityRecord:r}=e(u.store),a=r("postType",n(),t());if(a){if("function"==typeof a.content)return a.content(a);if(a.blocks)return(0,i.__unstableSerializeAndClean)(a.blocks);if(a.content)return a.content}return""}),[]),n=(0,we.useCopyToClipboard)(t,(function(){e("info",(0,f.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,o.createElement)(O.MenuItem,{ref:n},(0,f.__)("Copy all content"))}const tn=[{value:"visual",label:(0,f.__)("Visual editor")},{value:"text",label:(0,f.__)("Code editor")}];var nn=function(){const{shortcut:e,mode:t}=(0,c.useSelect)((e=>({shortcut:e(Nt.store).getShortcutRepresentation("core/edit-site/toggle-mode"),isRichEditingEnabled:e(_t).getSettings().richEditingEnabled,isCodeEditingEnabled:e(_t).getSettings().codeEditingEnabled,mode:e(_t).getEditorMode()})),[]),{switchEditorMode:n}=(0,c.useDispatch)(_t),r=tn.map((n=>n.value!==t?{...n,shortcut:e}:n));return(0,o.createElement)(O.MenuGroup,{label:(0,f.__)("Editor")},(0,o.createElement)(O.MenuItemsChoice,{choices:r,value:t,onSelect:n}))};const rn={className:"edit-site-more-menu__content",position:"bottom left"},an={tooltipPosition:"bottom"};function ln(){const[e,t]=(0,o.useReducer)((e=>!e),!1);return(0,Nt.useShortcut)("core/edit-site/keyboard-shortcuts",t),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(O.DropdownMenu,{className:"edit-site-more-menu",icon:At,label:(0,f.__)("More tools & options"),popoverProps:rn,toggleProps:an},(e=>{let{onClose:n}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(O.MenuGroup,{label:(0,f._x)("View","noun")},(0,o.createElement)(Ut,{feature:"fixedToolbar",label:(0,f.__)("Top toolbar"),info:(0,f.__)("Access all block and document tools in a single place"),messageActivated:(0,f.__)("Top toolbar activated"),messageDeactivated:(0,f.__)("Top toolbar deactivated")}),(0,o.createElement)(Ut,{feature:"focusMode",label:(0,f.__)("Spotlight mode"),info:(0,f.__)("Focus on one block at a time"),messageActivated:(0,f.__)("Spotlight mode activated"),messageDeactivated:(0,f.__)("Spotlight mode deactivated")}),(0,o.createElement)(nn,null),(0,o.createElement)(de.Slot,{name:"core/edit-site/plugin-more-menu",label:(0,f.__)("Plugins"),as:O.MenuGroup,fillProps:{onClick:n}})),(0,o.createElement)(O.MenuGroup,{label:(0,f.__)("Tools")},(0,o.createElement)(Zt,null),(0,o.createElement)(O.MenuItem,{onClick:t,shortcut:Rt.displayShortcut.access("h")},(0,f.__)("Keyboard shortcuts")),(0,o.createElement)(Jt,null),(0,o.createElement)(en,null),(0,o.createElement)(O.MenuItem,{icon:Lt,role:"menuitem",href:(0,f.__)("https://wordpress.org/support/article/site-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,f.__)("Help"),(0,o.createElement)(O.VisuallyHidden,{as:"span"},
|
20 |
/* translators: accessibility text */
|
14 |
/* translators: accessibility text for the footer landmark region. */
|
15 |
footer:(0,f.__)("Footer"),...m};return(0,o.createElement)("div",A({},_,{ref:(0,we.useMergeRefs)([t,_.ref]),className:B()(d,"interface-interface-skeleton",_.className,!!n&&"has-footer")}),!!c&&(0,o.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":g.drawer,tabIndex:"-1"},c),(0,o.createElement)("div",{className:"interface-interface-skeleton__editor"},!!r&&(0,o.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":g.header,tabIndex:"-1"},r),(0,o.createElement)("div",{className:"interface-interface-skeleton__body"},!!l&&(0,o.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":g.secondarySidebar,tabIndex:"-1"},l),!!i&&(0,o.createElement)("div",{className:"interface-interface-skeleton__notices"},i),(0,o.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":g.body,tabIndex:"-1"},s),!!a&&(0,o.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":g.sidebar,tabIndex:"-1"},a),!!u&&(0,o.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":g.actions,tabIndex:"-1"},u))),!!n&&(0,o.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":g.footer,tabIndex:"-1"},n))})),xe=window.wp.blockEditor,ke=window.wp.a11y;function Te(e){return!!e&&"custom"===(null==e?void 0:e.source)&&(null==e?void 0:e.has_theme_file)}function Ce(e){return{type:"TOGGLE_FEATURE",feature:e}}function Ie(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}function*Ne(e,t){const n={templateSlug:t};if(!t){const t=yield c.controls.resolveSelect(u.store,"getEntityRecord","postType","wp_template",e);n.templateSlug=null==t?void 0:t.slug}return{type:"SET_TEMPLATE",templateId:e,page:{context:n}}}function*Pe(e){const t=yield c.controls.dispatch(u.store,"saveEntityRecord","postType","wp_template",e);return e.content&&(yield c.controls.dispatch(u.store,"editEntityRecord","postType","wp_template",t.id,{blocks:(0,i.parse)(e.content)},{undoIgnore:!0})),{type:"SET_TEMPLATE",templateId:t.id,page:{context:{templateSlug:t.slug}}}}function*Me(e){try{yield c.controls.dispatch(u.store,"deleteEntityRecord","postType",e.type,e.id,{force:!0});const t=yield c.controls.select(u.store,"getLastEntityDeleteError","postType",e.type,e.id);if(t)throw t;yield c.controls.dispatch(R.store,"createSuccessNotice",(0,f.sprintf)(
|
16 |
/* translators: The template/part's name. */
|
17 |
+
(0,f.__)('"%s" deleted.'),e.title.rendered),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,f.__)("An error occurred while deleting the template.");yield c.controls.dispatch(R.store,"createErrorNotice",t,{type:"snackbar"})}}function Re(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function Ae(e){return{type:"SET_HOME_TEMPLATE",homeTemplateId:e}}function*Le(e){var t;if(!e.path&&null!==(t=e.context)&&void 0!==t&&t.postId){const t=yield c.controls.resolveSelect(u.store,"getEntityRecord","postType",e.context.postType||"post",e.context.postId);e.path=(0,p.getPathAndQueryString)(null==t?void 0:t.link)}const{id:n,slug:r}=yield c.controls.resolveSelect(u.store,"__experimentalGetTemplateForLink",e.path);return yield{type:"SET_PAGE",page:r?{...e,context:{...e.context,templateSlug:r}}:e,templateId:n},n}function Be(e){return{type:"SET_NAVIGATION_PANEL_ACTIVE_MENU",menu:e}}function Oe(e){return{type:"OPEN_NAVIGATION_PANEL_TO_MENU",menu:e}}function De(e){return{type:"SET_IS_NAVIGATION_PANEL_OPENED",isOpen:e}}function Fe(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function ze(e){return{type:"UPDATE_SETTINGS",settings:e}}function Ve(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}function*Ge(e){let{allowUndo:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Te(e))try{var n;const r=yield c.controls.select(u.store,"getEntity","postType",e.type);if(!r)return void(yield c.controls.dispatch(R.store,"createErrorNotice",(0,f.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const a=(0,p.addQueryArgs)(`${r.baseURL}/${e.id}`,{context:"edit",source:"theme"}),l=yield(0,h.apiFetch)({path:a});if(!l)return void(yield c.controls.dispatch(R.store,"createErrorNotice",(0,f.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const o=e=>{let{blocks:t=[]}=e;return(0,i.__unstableSerializeAndClean)(t)},s=yield c.controls.select(u.store,"getEditedEntityRecord","postType",e.type,e.id);yield c.controls.dispatch(u.store,"editEntityRecord","postType",e.type,e.id,{content:o,blocks:s.blocks,source:"custom"},{undoIgnore:!0});const m=(0,i.parse)(null==l||null===(n=l.content)||void 0===n?void 0:n.raw);if(yield c.controls.dispatch(u.store,"editEntityRecord","postType",e.type,l.id,{content:o,blocks:m,source:"theme"}),t){const t=async()=>{await(0,c.dispatch)(u.store).editEntityRecord("postType",e.type,s.id,{content:o,blocks:s.blocks,source:"custom"})};yield c.controls.dispatch(R.store,"createSuccessNotice",(0,f.__)("Template reverted."),{type:"snackbar",actions:[{label:(0,f.__)("Undo"),onClick:t}]})}else yield c.controls.dispatch(R.store,"createSuccessNotice",(0,f.__)("Template reverted."))}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,f.__)("Template revert failed. Please reload.");yield c.controls.dispatch(R.store,"createErrorNotice",t,{type:"snackbar"})}else yield c.controls.dispatch(R.store,"createErrorNotice",(0,f.__)("This template is not revertable."),{type:"snackbar"})}function*He(e){yield c.controls.dispatch(oe,"enableComplementaryArea",y,e)}function*Ue(){yield c.controls.dispatch(oe,"disableComplementaryArea",y)}function*We(e){yield{type:"SWITCH_MODE",mode:e},"visual"!==e&&(yield c.controls.dispatch(xe.store.name,"clearSelectedBlock"));const t={visual:(0,f.__)("Visual editor selected"),mosaic:(0,f.__)("Mosaic view selected")};t[e]&&(0,ke.speak)(t[e],"assertive")}function $e(e){return[e]}function je(){var e={clear:function(){e.head=null}};return e}function Ye(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function qe(e,t,n){return!!k[e]&&("home"===e&&"posts"!==n||k[e].every((e=>t.includes(e)||qe(e,t,n))))}function Xe(e,t){return(0,H.get)(e.preferences.features,[t],!1)}function Ke(e){return e.deviceType}ye={},ve="undefined"!=typeof WeakMap;const Qe=(0,c.createRegistrySelector)((e=>()=>e(u.store).canUser("create","media"))),Ze=(0,c.createRegistrySelector)((e=>()=>"web"===o.Platform.OS?e(u.store).getEntityRecords("postType","wp_block",{per_page:-1}):[])),Je=function(e,t){var n,r;function a(){n=ve?new WeakMap:je()}function l(){var n,a,l,o,i,s=arguments.length;for(o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];for(i=t.apply(null,o),(n=r(i)).isUniqueByDependants||(n.lastDependants&&!Ye(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),a=n.head;a;){if(Ye(a.args,o,1))return a!==n.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n.head,a.prev=null,n.head.prev=a,n.head=a),a.val;a=a.next}return a={val:e.apply(null,o)},o[0]=null,a.args=o,n.head&&(n.head.prev=a,a.next=n.head),n.head=a,a.val}return t||(t=$e),r=ve?function(e){var t,r,a,l,o,i=n,s=!0;for(t=0;t<e.length;t++){if(!(o=r=e[t])||"object"!=typeof o){s=!1;break}i.has(r)?i=i.get(r):(a=new WeakMap,i.set(r,a),i=a)}return i.has(ye)||((l=je()).isUniqueByDependants=s,i.set(ye,l)),i.get(ye)}:function(){return n},l.getDependants=t,l.clear=a,a(),l}(((e,t)=>{const n={...e.settings,outlineMode:!0,focusMode:Xe(e,"focusMode"),hasFixedToolbar:Xe(e,"fixedToolbar"),__experimentalSetIsInserterOpened:t,__experimentalReusableBlocks:Ze(e)};return Qe(e)?(n.mediaUpload=t=>{let{onError:n,...r}=t;(0,g.uploadMedia)({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:e=>{let{message:t}=e;return n(t)},...r})},n):n}),(e=>[Qe(e),e.settings,Xe(e,"focusMode"),Xe(e,"fixedToolbar"),Ze(e)]));function et(e){return e.homeTemplateId}function tt(e){return e.editedPost}function nt(e){return tt(e).type}function rt(e){return tt(e).id}function at(e){return tt(e).page}function lt(e){return e.navigationPanel.menu}const ot=(0,c.createRegistrySelector)((e=>t=>{const n=nt(t),r=rt(t),a=r?e(u.store).getEntityRecord("postType",n,r):null;if(!a)return T;var l;if("wp_template_part"===n)return(null===(l=N.find((e=>e.area===(null==a?void 0:a.area))))||void 0===l?void 0:l.menu)||"template-parts";const o=e(u.store).getEntityRecords("postType","wp_template"),i=e(u.store).getEditedEntityRecord("root","site").show_on_front;return qe(a.slug,(0,H.map)(o,"slug"),i)?"templates-unused":(s=a.slug,b.includes(s)?C:w.includes(s)?I:S.some((e=>s.startsWith(e)))?"templates-posts":x.some((e=>s.startsWith(e)))?"templates-pages":I);var s}));function it(e){return e.navigationPanel.isOpen}function st(e){return!!e.blockInserterPanel}function ct(e){const{rootClientId:t,insertionIndex:n,filterValue:r}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n,filterValue:r}}function ut(e){return e.listViewPanel}const mt=(0,c.createRegistrySelector)((e=>t=>{var n;const r=nt(t),a=rt(t),l=e(u.store).getEditedEntityRecord("postType",r,a),o=e(u.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),s=(0,H.keyBy)(o,(e=>e.id));return(null!==(n=l.blocks)&&void 0!==n?n:[]).filter((e=>(0,i.isTemplatePart)(e))).map((e=>{const{attributes:{theme:t,slug:n}}=e;return{templatePart:s[`${t}//${n}`],block:e}})).filter((e=>{let{templatePart:t}=e;return!!t}))}));function dt(e){return e.preferences.editorMode||"visual"}const pt={reducer:M,actions:a,selectors:l,controls:h.controls,persist:["preferences"]},_t=(0,c.createReduxStore)(y,pt);(0,c.registerStore)(y,pt);var gt,ht=gt||(gt={});ht.Pop="POP",ht.Push="PUSH",ht.Replace="REPLACE";function Et(e){e.preventDefault(),e.returnValue=""}function ft(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}const yt=function(e){function t(){var e=o.location,t=i.state||{};return[t.idx,{pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"}]}function n(e){return"string"==typeof e?e:function(e){var t=e.pathname,n=e.search;return(void 0===t?"/":t)+(void 0===n?"":n)+(void 0===(e=e.hash)?"":e)}(e)}function r(e,t){return void 0===t&&(t=null),A({pathname:m.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){c=e,e=t(),u=e[0],m=e[1],d.call({action:c,location:m})}function l(e){i.go(e)}void 0===e&&(e={});var o=void 0===(e=e.window)?document.defaultView:e,i=o.history,s=null;o.addEventListener("popstate",(function(){if(s)p.call(s),s=null;else{var e=gt.Pop,n=t(),r=n[0];if(n=n[1],p.length){if(null!=r){var o=u-r;o&&(s={action:e,location:n,retry:function(){l(-1*o)}},l(o))}}else a(e)}}));var c=gt.Pop,u=(e=t())[0],m=e[1],d=ft(),p=ft();return null==u&&(u=0,i.replaceState(A({},i.state,{idx:u}),"")),{get action(){return c},get location(){return m},createHref:n,push:function e(t,l){var s=gt.Push,c=r(t,l);if(!p.length||(p.call({action:s,location:c,retry:function(){e(t,l)}}),0)){var m=[{usr:c.state,key:c.key,idx:u+1},n(c)];c=m[0],m=m[1];try{i.pushState(c,"",m)}catch(e){o.location.assign(m)}a(s)}},replace:function e(t,l){var o=gt.Replace,s=r(t,l);p.length&&(p.call({action:o,location:s,retry:function(){e(t,l)}}),1)||(s=[{usr:s.state,key:s.key,idx:u},n(s)],i.replaceState(s[0],"",s[1]),a(o))},go:l,back:function(){l(-1)},forward:function(){l(1)},listen:function(e){return d.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&o.addEventListener("beforeunload",Et),function(){t(),p.length||o.removeEventListener("beforeunload",Et)}}}}(),vt=yt.push,bt=yt.replace;yt.push=function(e,t){return vt.call(yt,(0,p.addQueryArgs)(window.location.href,e),t)},yt.replace=function(e,t){return bt.call(yt,(0,p.addQueryArgs)(window.location.href,e),t)};var wt=yt;const St=(0,o.createContext)(),xt=(0,o.createContext)();function kt(){return(0,o.useContext)(St)}function Tt(){return(0,o.useContext)(xt)}function Ct(e){const t=new URLSearchParams(e.search);return{...e,params:Object.fromEntries(t.entries())}}function It(e){let{children:t}=e;const[n,r]=(0,o.useState)((()=>Ct(wt.location)));return(0,o.useEffect)((()=>wt.listen((e=>{let{location:t}=e;r(Ct(t))}))),[]),(0,o.createElement)(xt.Provider,{value:wt},(0,o.createElement)(St.Provider,{value:n},t(n)))}var Nt=window.wp.keyboardShortcuts,Pt=(0,o.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(D.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),Mt=(0,o.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(D.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"})),Rt=window.wp.keycodes,At=(0,o.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(D.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Lt=(0,o.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(D.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const Bt=[{keyCombination:{modifier:"primary",character:"b"},description:(0,f.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,f.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,f.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,f.__)("Remove a link.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,f.__)("Underline the selected text.")}];function Ot(e){let{keyCombination:t,forceAriaLabel:n}=e;const r=t.modifier?Rt.displayShortcutList[t.modifier](t.character):t.character,a=t.modifier?Rt.shortcutAriaLabel[t.modifier](t.character):t.character;return(0,o.createElement)("kbd",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":n||a},(0,H.castArray)(r).map(((e,t)=>"+"===e?(0,o.createElement)(o.Fragment,{key:t},e):(0,o.createElement)("kbd",{key:t,className:"edit-site-keyboard-shortcut-help-modal__shortcut-key"},e))))}function Dt(e){let{description:t,keyCombination:n,aliases:r=[],ariaLabel:a}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-description"},t),(0,o.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-term"},(0,o.createElement)(Ot,{keyCombination:n,forceAriaLabel:a}),r.map(((e,t)=>(0,o.createElement)(Ot,{keyCombination:e,forceAriaLabel:a,key:t})))))}function Ft(e){let{name:t}=e;const{keyCombination:n,description:r,aliases:a}=(0,c.useSelect)((e=>{const{getShortcutKeyCombination:n,getShortcutDescription:r,getShortcutAliases:a}=e(Nt.store);return{keyCombination:n(t),aliases:a(t),description:r(t)}}),[t]);return n?(0,o.createElement)(Dt,{keyCombination:n,description:r,aliases:a}):null}const zt=e=>{let{shortcuts:t}=e;return(0,o.createElement)("ul",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-list",role:"list"},t.map(((e,t)=>(0,o.createElement)("li",{className:"edit-site-keyboard-shortcut-help-modal__shortcut",key:t},(0,H.isString)(e)?(0,o.createElement)(Ft,{name:e}):(0,o.createElement)(Dt,e)))))},Vt=e=>{let{title:t,shortcuts:n,className:r}=e;return(0,o.createElement)("section",{className:B()("edit-site-keyboard-shortcut-help-modal__section",r)},!!t&&(0,o.createElement)("h2",{className:"edit-site-keyboard-shortcut-help-modal__section-title"},t),(0,o.createElement)(zt,{shortcuts:n}))},Gt=e=>{let{title:t,categoryName:n,additionalShortcuts:r=[]}=e;const a=(0,c.useSelect)((e=>e(Nt.store).getCategoryShortcuts(n)),[n]);return(0,o.createElement)(Vt,{title:t,shortcuts:a.concat(r)})};function Ht(e){let{isModalActive:t,toggleModal:n}=e;return t?(0,o.createElement)(O.Modal,{className:"edit-site-keyboard-shortcut-help-modal",title:(0,f.__)("Keyboard shortcuts"),closeLabel:(0,f.__)("Close"),onRequestClose:n},(0,o.createElement)(Vt,{className:"edit-site-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-site/keyboard-shortcuts"]}),(0,o.createElement)(Gt,{title:(0,f.__)("Global shortcuts"),categoryName:"global"}),(0,o.createElement)(Gt,{title:(0,f.__)("Selection shortcuts"),categoryName:"selection"}),(0,o.createElement)(Gt,{title:(0,f.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,f.__)("Change the block type after adding a new paragraph."),
|
18 |
/* translators: The forward-slash character. e.g. '/'. */
|
19 |
ariaLabel:(0,f.__)("Forward-slash")}]}),(0,o.createElement)(Vt,{title:(0,f.__)("Text formatting"),shortcuts:Bt})):null}function Ut(e){let{feature:t,label:n,info:r,messageActivated:a,messageDeactivated:l}=e;const i=(0,c.useSelect)((e=>e(_t).isFeatureActive(t)),[]),{toggleFeature:s}=(0,c.useDispatch)(_t);return(0,o.createElement)(O.MenuItem,{icon:i&&F,isSelected:i,onClick:(0,H.flow)(s.bind(null,t),(()=>{i?(0,ke.speak)(l||(0,f.__)("Feature deactivated")):(0,ke.speak)(a||(0,f.__)("Feature activated"))})),role:"menuitemcheckbox",info:r},n)}const{Fill:Wt,Slot:$t}=(0,O.createSlotFill)("EditSiteToolsMoreMenuGroup");Wt.Slot=e=>{let{fillProps:t}=e;return(0,o.createElement)($t,{fillProps:t},(e=>!(0,H.isEmpty)(e)&&e))};var jt=Wt,Yt=n(3729),qt=n.n(Yt),Xt=window.wp.apiFetch,Kt=n.n(Xt),Qt=(0,o.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(D.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"}));function Zt(){const{createErrorNotice:e}=(0,c.useDispatch)(R.store);return(0,o.createElement)(O.MenuItem,{role:"menuitem",icon:Qt,onClick:async function(){try{const e=await Kt()({path:"/wp-block-editor/v1/export",parse:!1}),t=await e.blob();qt()(t,"edit-site-export.zip","application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const r=n.message&&"unknown_error"!==n.code?n.message:(0,f.__)("An error occurred while creating the site export.");e(r,{type:"snackbar"})}},info:(0,f.__)("Download your templates and template parts.")},(0,f._x)("Export","site exporter menu item"))}function Jt(){const{toggleFeature:e}=(0,c.useDispatch)(_t);return(0,o.createElement)(O.MenuItem,{onClick:()=>e("welcomeGuide")},(0,f.__)("Welcome Guide"))}function en(){const{createNotice:e}=(0,c.useDispatch)(R.store),t=(0,c.useSelect)((e=>()=>{const{getEditedPostId:t,getEditedPostType:n}=e(_t),{getEditedEntityRecord:r}=e(u.store),a=r("postType",n(),t());if(a){if("function"==typeof a.content)return a.content(a);if(a.blocks)return(0,i.__unstableSerializeAndClean)(a.blocks);if(a.content)return a.content}return""}),[]),n=(0,we.useCopyToClipboard)(t,(function(){e("info",(0,f.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,o.createElement)(O.MenuItem,{ref:n},(0,f.__)("Copy all content"))}const tn=[{value:"visual",label:(0,f.__)("Visual editor")},{value:"text",label:(0,f.__)("Code editor")}];var nn=function(){const{shortcut:e,mode:t}=(0,c.useSelect)((e=>({shortcut:e(Nt.store).getShortcutRepresentation("core/edit-site/toggle-mode"),isRichEditingEnabled:e(_t).getSettings().richEditingEnabled,isCodeEditingEnabled:e(_t).getSettings().codeEditingEnabled,mode:e(_t).getEditorMode()})),[]),{switchEditorMode:n}=(0,c.useDispatch)(_t),r=tn.map((n=>n.value!==t?{...n,shortcut:e}:n));return(0,o.createElement)(O.MenuGroup,{label:(0,f.__)("Editor")},(0,o.createElement)(O.MenuItemsChoice,{choices:r,value:t,onSelect:n}))};const rn={className:"edit-site-more-menu__content",position:"bottom left"},an={tooltipPosition:"bottom"};function ln(){const[e,t]=(0,o.useReducer)((e=>!e),!1);return(0,Nt.useShortcut)("core/edit-site/keyboard-shortcuts",t),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(O.DropdownMenu,{className:"edit-site-more-menu",icon:At,label:(0,f.__)("More tools & options"),popoverProps:rn,toggleProps:an},(e=>{let{onClose:n}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(O.MenuGroup,{label:(0,f._x)("View","noun")},(0,o.createElement)(Ut,{feature:"fixedToolbar",label:(0,f.__)("Top toolbar"),info:(0,f.__)("Access all block and document tools in a single place"),messageActivated:(0,f.__)("Top toolbar activated"),messageDeactivated:(0,f.__)("Top toolbar deactivated")}),(0,o.createElement)(Ut,{feature:"focusMode",label:(0,f.__)("Spotlight mode"),info:(0,f.__)("Focus on one block at a time"),messageActivated:(0,f.__)("Spotlight mode activated"),messageDeactivated:(0,f.__)("Spotlight mode deactivated")}),(0,o.createElement)(nn,null),(0,o.createElement)(de.Slot,{name:"core/edit-site/plugin-more-menu",label:(0,f.__)("Plugins"),as:O.MenuGroup,fillProps:{onClick:n}})),(0,o.createElement)(O.MenuGroup,{label:(0,f.__)("Tools")},(0,o.createElement)(Zt,null),(0,o.createElement)(O.MenuItem,{onClick:t,shortcut:Rt.displayShortcut.access("h")},(0,f.__)("Keyboard shortcuts")),(0,o.createElement)(Jt,null),(0,o.createElement)(en,null),(0,o.createElement)(O.MenuItem,{icon:Lt,role:"menuitem",href:(0,f.__)("https://wordpress.org/support/article/site-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,f.__)("Help"),(0,o.createElement)(O.VisuallyHidden,{as:"span"},
|
20 |
/* translators: accessibility text */
|
changelog.txt
CHANGED
@@ -1,241 +1,250 @@
|
|
1 |
== Changelog ==
|
2 |
|
3 |
-
= 12.5.
|
4 |
|
5 |
-
### Features
|
6 |
-
|
7 |
-
* Allow switching global styles variations. ([35619](https://github.com/WordPress/gutenberg/pull/35619))
|
8 |
-
* Add: Code editor to edit site. ([37765](https://github.com/WordPress/gutenberg/pull/37765))
|
9 |
-
* [Post Featured Image]: Show all the controls when inside a Query Loop. ([37945](https://github.com/WordPress/gutenberg/pull/37945))
|
10 |
-
|
11 |
-
### Enhancements
|
12 |
-
|
13 |
-
#### Block Library
|
14 |
-
|
15 |
-
* Add transform between core/site-logo and core/site-title blocks. ([37920](https://github.com/WordPress/gutenberg/pull/37920))
|
16 |
-
* Allow using a text label instead of an icon on overlay menu toggle button. ([36149](https://github.com/WordPress/gutenberg/pull/36149))
|
17 |
-
* Post Featured Image: Add size selector. ([38044](https://github.com/WordPress/gutenberg/pull/38044))
|
18 |
-
* [Query Loop]: Add multiple authors support. ([38024](https://github.com/WordPress/gutenberg/pull/38024))
|
19 |
-
* [Query Loop]: Add support for custom taxonomies filtering. ([38063](https://github.com/WordPress/gutenberg/pull/38063))
|
20 |
-
* Comments Query Loop: Add discuss options to the block. ([37297](https://github.com/WordPress/gutenberg/pull/37297))
|
21 |
-
* Fetch classic Menus and Pages using view (readonly) context. ([37884](https://github.com/WordPress/gutenberg/pull/37884))
|
22 |
-
* Gallery block: Move add/edit media to block toolbar. ([38036](https://github.com/WordPress/gutenberg/pull/38036))
|
23 |
-
* Navigation Block : Try not using css variable for block gap support. ([37543](https://github.com/WordPress/gutenberg/pull/37543))
|
24 |
-
* Paragraph: Try to avoid a trailing word in the description. ([37483](https://github.com/WordPress/gutenberg/pull/37483))
|
25 |
-
* Rename next and previous to newer an older. ([38143](https://github.com/WordPress/gutenberg/pull/38143))
|
26 |
-
* Show menus selection in placeholder only if available. ([37980](https://github.com/WordPress/gutenberg/pull/37980))
|
27 |
-
* Unset inherited backgrounds on Posts Lists. ([37941](https://github.com/WordPress/gutenberg/pull/37941))
|
28 |
-
* Unset inherited backgrounds on social icons. ([37940](https://github.com/WordPress/gutenberg/pull/37940))
|
29 |
-
|
30 |
-
#### Components
|
31 |
-
|
32 |
-
* CustomSelectControl: Add hints example to storybook. ([38056](https://github.com/WordPress/gutenberg/pull/38056))
|
33 |
-
* ToolsPanel: Add CSS classes to first and last displayed ToolsPanelItems. ([37546](https://github.com/WordPress/gutenberg/pull/37546))
|
34 |
-
* `Navigator`: Add basic location history. ([37416](https://github.com/WordPress/gutenberg/pull/37416))
|
35 |
-
* Add: Hover and Selected states to the palette editor. ([37962](https://github.com/WordPress/gutenberg/pull/37962))
|
36 |
-
* Update gray color palette to match base styles. ([38109](https://github.com/WordPress/gutenberg/pull/38109))
|
37 |
-
|
38 |
-
#### Post Editor
|
39 |
-
|
40 |
-
* Post Lock Modal: Update avatar size. ([38040](https://github.com/WordPress/gutenberg/pull/38040))
|
41 |
-
* Post Lock: Adjust avatar design and update message. ([37979](https://github.com/WordPress/gutenberg/pull/37979))
|
42 |
-
* Block styles: Remove box-sizing rule on Post Editor container to achieve editor/frontend parity. ([37902](https://github.com/WordPress/gutenberg/pull/37902))
|
43 |
-
|
44 |
-
#### Block Editor
|
45 |
-
|
46 |
-
* Buttons: Preserve styling from adjacent button blocks when inserting a new button block. ([37905](https://github.com/WordPress/gutenberg/pull/37905))
|
47 |
-
* Identify the site frontpage in link UI search results. ([36493](https://github.com/WordPress/gutenberg/pull/36493))
|
48 |
-
* Rich text: Use file on internal dependencies. ([38005](https://github.com/WordPress/gutenberg/pull/38005))
|
49 |
-
* Transform pasted div tags to p tags. ([38042](https://github.com/WordPress/gutenberg/pull/38042))
|
50 |
-
|
51 |
-
#### Site Editor
|
52 |
-
|
53 |
-
* Update template home, front-page, and search template descriptions. ([38132](https://github.com/WordPress/gutenberg/pull/38132))
|
54 |
-
* Add: Copy all content to edit site. ([37781](https://github.com/WordPress/gutenberg/pull/37781))
|
55 |
-
|
56 |
-
#### Global Styles
|
57 |
-
|
58 |
-
* Load the global styles before the theme styles in the editor. ([37885](https://github.com/WordPress/gutenberg/pull/37885))
|
59 |
-
* Duotone: Allow users to specify custom filters. ([38055](https://github.com/WordPress/gutenberg/pull/38055))
|
60 |
-
* Enable alpha on Block Inspector Color ToolsPanel. ([37731](https://github.com/WordPress/gutenberg/pull/37731))
|
61 |
-
|
62 |
-
#### Internationalization
|
63 |
-
|
64 |
-
* i18n: Create new function `addLocaleData` to merge domain configuration. ([37704](https://github.com/WordPress/gutenberg/pull/37704))
|
65 |
-
|
66 |
-
#### REST API
|
67 |
-
|
68 |
-
* [Global Styles]: Add REST API endpoint to fetch variations. ([38124](https://github.com/WordPress/gutenberg/pull/38124))
|
69 |
-
|
70 |
-
#### WP ENV
|
71 |
-
|
72 |
-
* wp-env: Add install-path command. ([35638](https://github.com/WordPress/gutenberg/pull/35638))
|
73 |
-
|
74 |
### Bug Fixes
|
75 |
|
76 |
-
#### Block Library
|
77 |
-
|
78 |
-
* Add classic menus to menu switcher. ([38168](https://github.com/WordPress/gutenberg/pull/38168))
|
79 |
-
* Always allow accessing edit.php?post_type=wp_navigation page. ([38170](https://github.com/WordPress/gutenberg/pull/38170))
|
80 |
-
* Fix Post Date block escaping of date HTML. ([38023](https://github.com/WordPress/gutenberg/pull/38023))
|
81 |
-
* Fix duotone render in non-fse themes. ([37954](https://github.com/WordPress/gutenberg/pull/37954))
|
82 |
-
* Social Icons: Fix color picker bug when set to Logos Only. ([38006](https://github.com/WordPress/gutenberg/pull/38006))
|
83 |
-
* Temporarily remove text decoration from Nav block. ([37963](https://github.com/WordPress/gutenberg/pull/37963))
|
84 |
-
* [Query Loop]: Reorganise inspector controls + `order` selection bug. ([37949](https://github.com/WordPress/gutenberg/pull/37949))
|
85 |
-
* Revert "Late escape RSS block (#37878)". ([38117](https://github.com/WordPress/gutenberg/pull/38117))
|
86 |
-
* Fix missing default `align-items` when items are oriented vertically in `flex` layout. ([38069](https://github.com/WordPress/gutenberg/pull/38069))
|
87 |
-
* Update `micromodal` to 0.4.10 to fix navigation close button. ([38032](https://github.com/WordPress/gutenberg/pull/38032))
|
88 |
-
|
89 |
#### Site Editor
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
*
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
*
|
108 |
-
*
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
*
|
113 |
-
*
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
*
|
118 |
-
*
|
119 |
-
*
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
*
|
126 |
-
*
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
*
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
*
|
141 |
-
|
142 |
-
####
|
143 |
-
|
144 |
-
*
|
145 |
-
* Add
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
*
|
151 |
-
*
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
* Add
|
170 |
-
*
|
171 |
-
*
|
172 |
-
*
|
173 |
-
*
|
174 |
-
*
|
175 |
-
*
|
176 |
-
*
|
177 |
-
*
|
178 |
-
*
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
*
|
183 |
-
*
|
184 |
-
*
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
*
|
192 |
-
*
|
193 |
-
*
|
194 |
-
* Add
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
*
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
*
|
204 |
-
*
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
*
|
209 |
-
*
|
210 |
-
*
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
*
|
217 |
-
*
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
*
|
222 |
-
*
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
*
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
* Fix
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
*
|
236 |
-
* Add
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
|
240 |
|
241 |
= 12.4.1 =
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 12.5.1 =
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
### Bug Fixes
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
#### Site Editor
|
8 |
|
9 |
+
- Fix a WSOD in the site editor which occurred when an entity could be undefined (https://github.com/WordPress/gutenberg/pull/38503)
|
10 |
+
|
11 |
+
|
12 |
+
= 12.5.0 =
|
13 |
+
|
14 |
+
### Features
|
15 |
+
|
16 |
+
* Allow switching global styles variations. ([35619](https://github.com/WordPress/gutenberg/pull/35619))
|
17 |
+
* Add: Code editor to edit site. ([37765](https://github.com/WordPress/gutenberg/pull/37765))
|
18 |
+
* [Post Featured Image]: Show all the controls when inside a Query Loop. ([37945](https://github.com/WordPress/gutenberg/pull/37945))
|
19 |
+
|
20 |
+
### Enhancements
|
21 |
+
|
22 |
+
#### Block Library
|
23 |
+
|
24 |
+
* Add transform between core/site-logo and core/site-title blocks. ([37920](https://github.com/WordPress/gutenberg/pull/37920))
|
25 |
+
* Allow using a text label instead of an icon on overlay menu toggle button. ([36149](https://github.com/WordPress/gutenberg/pull/36149))
|
26 |
+
* Post Featured Image: Add size selector. ([38044](https://github.com/WordPress/gutenberg/pull/38044))
|
27 |
+
* [Query Loop]: Add multiple authors support. ([38024](https://github.com/WordPress/gutenberg/pull/38024))
|
28 |
+
* [Query Loop]: Add support for custom taxonomies filtering. ([38063](https://github.com/WordPress/gutenberg/pull/38063))
|
29 |
+
* Comments Query Loop: Add discuss options to the block. ([37297](https://github.com/WordPress/gutenberg/pull/37297))
|
30 |
+
* Fetch classic Menus and Pages using view (readonly) context. ([37884](https://github.com/WordPress/gutenberg/pull/37884))
|
31 |
+
* Gallery block: Move add/edit media to block toolbar. ([38036](https://github.com/WordPress/gutenberg/pull/38036))
|
32 |
+
* Navigation Block : Try not using css variable for block gap support. ([37543](https://github.com/WordPress/gutenberg/pull/37543))
|
33 |
+
* Paragraph: Try to avoid a trailing word in the description. ([37483](https://github.com/WordPress/gutenberg/pull/37483))
|
34 |
+
* Rename next and previous to newer an older. ([38143](https://github.com/WordPress/gutenberg/pull/38143))
|
35 |
+
* Show menus selection in placeholder only if available. ([37980](https://github.com/WordPress/gutenberg/pull/37980))
|
36 |
+
* Unset inherited backgrounds on Posts Lists. ([37941](https://github.com/WordPress/gutenberg/pull/37941))
|
37 |
+
* Unset inherited backgrounds on social icons. ([37940](https://github.com/WordPress/gutenberg/pull/37940))
|
38 |
+
|
39 |
+
#### Components
|
40 |
+
|
41 |
+
* CustomSelectControl: Add hints example to storybook. ([38056](https://github.com/WordPress/gutenberg/pull/38056))
|
42 |
+
* ToolsPanel: Add CSS classes to first and last displayed ToolsPanelItems. ([37546](https://github.com/WordPress/gutenberg/pull/37546))
|
43 |
+
* `Navigator`: Add basic location history. ([37416](https://github.com/WordPress/gutenberg/pull/37416))
|
44 |
+
* Add: Hover and Selected states to the palette editor. ([37962](https://github.com/WordPress/gutenberg/pull/37962))
|
45 |
+
* Update gray color palette to match base styles. ([38109](https://github.com/WordPress/gutenberg/pull/38109))
|
46 |
+
|
47 |
+
#### Post Editor
|
48 |
+
|
49 |
+
* Post Lock Modal: Update avatar size. ([38040](https://github.com/WordPress/gutenberg/pull/38040))
|
50 |
+
* Post Lock: Adjust avatar design and update message. ([37979](https://github.com/WordPress/gutenberg/pull/37979))
|
51 |
+
* Block styles: Remove box-sizing rule on Post Editor container to achieve editor/frontend parity. ([37902](https://github.com/WordPress/gutenberg/pull/37902))
|
52 |
+
|
53 |
+
#### Block Editor
|
54 |
+
|
55 |
+
* Buttons: Preserve styling from adjacent button blocks when inserting a new button block. ([37905](https://github.com/WordPress/gutenberg/pull/37905))
|
56 |
+
* Identify the site frontpage in link UI search results. ([36493](https://github.com/WordPress/gutenberg/pull/36493))
|
57 |
+
* Rich text: Use file on internal dependencies. ([38005](https://github.com/WordPress/gutenberg/pull/38005))
|
58 |
+
* Transform pasted div tags to p tags. ([38042](https://github.com/WordPress/gutenberg/pull/38042))
|
59 |
+
|
60 |
+
#### Site Editor
|
61 |
+
|
62 |
+
* Update template home, front-page, and search template descriptions. ([38132](https://github.com/WordPress/gutenberg/pull/38132))
|
63 |
+
* Add: Copy all content to edit site. ([37781](https://github.com/WordPress/gutenberg/pull/37781))
|
64 |
+
|
65 |
+
#### Global Styles
|
66 |
+
|
67 |
+
* Load the global styles before the theme styles in the editor. ([37885](https://github.com/WordPress/gutenberg/pull/37885))
|
68 |
+
* Duotone: Allow users to specify custom filters. ([38055](https://github.com/WordPress/gutenberg/pull/38055))
|
69 |
+
* Enable alpha on Block Inspector Color ToolsPanel. ([37731](https://github.com/WordPress/gutenberg/pull/37731))
|
70 |
+
|
71 |
+
#### Internationalization
|
72 |
+
|
73 |
+
* i18n: Create new function `addLocaleData` to merge domain configuration. ([37704](https://github.com/WordPress/gutenberg/pull/37704))
|
74 |
+
|
75 |
+
#### REST API
|
76 |
+
|
77 |
+
* [Global Styles]: Add REST API endpoint to fetch variations. ([38124](https://github.com/WordPress/gutenberg/pull/38124))
|
78 |
+
|
79 |
+
#### WP ENV
|
80 |
+
|
81 |
+
* wp-env: Add install-path command. ([35638](https://github.com/WordPress/gutenberg/pull/35638))
|
82 |
+
|
83 |
+
### Bug Fixes
|
84 |
+
|
85 |
+
#### Block Library
|
86 |
+
|
87 |
+
* Add classic menus to menu switcher. ([38168](https://github.com/WordPress/gutenberg/pull/38168))
|
88 |
+
* Always allow accessing edit.php?post_type=wp_navigation page. ([38170](https://github.com/WordPress/gutenberg/pull/38170))
|
89 |
+
* Fix Post Date block escaping of date HTML. ([38023](https://github.com/WordPress/gutenberg/pull/38023))
|
90 |
+
* Fix duotone render in non-fse themes. ([37954](https://github.com/WordPress/gutenberg/pull/37954))
|
91 |
+
* Social Icons: Fix color picker bug when set to Logos Only. ([38006](https://github.com/WordPress/gutenberg/pull/38006))
|
92 |
+
* Temporarily remove text decoration from Nav block. ([37963](https://github.com/WordPress/gutenberg/pull/37963))
|
93 |
+
* [Query Loop]: Reorganise inspector controls + `order` selection bug. ([37949](https://github.com/WordPress/gutenberg/pull/37949))
|
94 |
+
* Revert "Late escape RSS block (#37878)". ([38117](https://github.com/WordPress/gutenberg/pull/38117))
|
95 |
+
* Fix missing default `align-items` when items are oriented vertically in `flex` layout. ([38069](https://github.com/WordPress/gutenberg/pull/38069))
|
96 |
+
* Update `micromodal` to 0.4.10 to fix navigation close button. ([38032](https://github.com/WordPress/gutenberg/pull/38032))
|
97 |
+
|
98 |
+
#### Site Editor
|
99 |
+
|
100 |
+
* Fix empty gray circle when site has no logo on template list page. ([37474](https://github.com/WordPress/gutenberg/pull/37474))
|
101 |
+
* Fix hiding the bottom of tablet/mobile preview in Site Editor. ([38019](https://github.com/WordPress/gutenberg/pull/38019))
|
102 |
+
* Fix resizable box scrollbars in blocks. ([38123](https://github.com/WordPress/gutenberg/pull/38123))
|
103 |
+
* Override Site Editor URLs to use plugin page. ([38232](https://github.com/WordPress/gutenberg/pull/38232))
|
104 |
+
* Restore ?styles=open functionality. ([38093](https://github.com/WordPress/gutenberg/pull/38093))
|
105 |
+
* Site Editor: Fix Inserter classes. ([38112](https://github.com/WordPress/gutenberg/pull/38112))
|
106 |
+
|
107 |
+
#### Block Editor
|
108 |
+
|
109 |
+
* Fix pattern preview expanding height and scrollbar issues. ([38175](https://github.com/WordPress/gutenberg/pull/38175))
|
110 |
+
* Remove warning for enqueued styles in Editor. ([37937](https://github.com/WordPress/gutenberg/pull/37937))
|
111 |
+
* Fix draft previews. ([37952](https://github.com/WordPress/gutenberg/pull/37952))
|
112 |
+
* Add context to font style and font weight related translation strings. ([37939](https://github.com/WordPress/gutenberg/pull/37939))
|
113 |
+
|
114 |
+
#### Post Editor
|
115 |
+
|
116 |
+
* Editor: Fix post lock data inconsistency. ([37914](https://github.com/WordPress/gutenberg/pull/37914))
|
117 |
+
* Fix template queries. ([38070](https://github.com/WordPress/gutenberg/pull/38070))
|
118 |
+
|
119 |
+
#### Block Library
|
120 |
+
|
121 |
+
* Latest Posts: Fix featured image alignment label position. ([38125](https://github.com/WordPress/gutenberg/pull/38125))
|
122 |
+
* Remove the aria-label from the site title block. ([38432](https://github.com/WordPress/gutenberg/pull/38432))
|
123 |
+
|
124 |
+
#### Components
|
125 |
+
|
126 |
+
* Increase ConfirmDialog overlay's z-index to render above popovers. ([37959](https://github.com/WordPress/gutenberg/pull/37959))
|
127 |
+
* Label components: Improve consistency by setting to 8px margin-bottom. ([37844](https://github.com/WordPress/gutenberg/pull/37844))
|
128 |
+
* RangeControl: Fix space between icons and rail. ([36935](https://github.com/WordPress/gutenberg/pull/36935))
|
129 |
+
* `SelectControl`: Mark the `children` prop as optional. ([37872](https://github.com/WordPress/gutenberg/pull/37872))
|
130 |
+
* `ToggleGroupControl`: Remove animated backdrop. ([38008](https://github.com/WordPress/gutenberg/pull/38008))
|
131 |
+
|
132 |
+
#### Design Tools
|
133 |
+
|
134 |
+
* Fix: Double border on palette editor. ([38035](https://github.com/WordPress/gutenberg/pull/38035))
|
135 |
+
* Fix: PanelColorSettings renders an empty when a color setting is falsy. ([38029](https://github.com/WordPress/gutenberg/pull/38029))
|
136 |
+
|
137 |
+
#### Accessibility
|
138 |
+
|
139 |
+
* Make sure when on last block focus cannot enter the block. ([37965](https://github.com/WordPress/gutenberg/pull/37965))
|
140 |
+
* Tree Grid: Fix keyboard navigation for expand/collapse table rows in Firefox. ([37983](https://github.com/WordPress/gutenberg/pull/37983))
|
141 |
+
|
142 |
+
#### Data API
|
143 |
+
|
144 |
+
* Load the entities list using the view context. ([37685](https://github.com/WordPress/gutenberg/pull/37685))
|
145 |
+
* Fix inconsistent response when preloading OPTIONS type requests. ([38051](https://github.com/WordPress/gutenberg/pull/38051))
|
146 |
+
|
147 |
+
#### Widgets Editor
|
148 |
+
|
149 |
+
* Fix empty secondary sidebar overlapping widget editor content on mobile viewports. ([38017](https://github.com/WordPress/gutenberg/pull/38017))
|
150 |
+
|
151 |
+
#### Developer Tooling
|
152 |
+
|
153 |
+
* Docgen/stop crashing on missing return types. ([37929](https://github.com/WordPress/gutenberg/pull/37929))
|
154 |
+
* Add temporary workaround to fix broken common js import of mini-css-extract-plugin. ([38004](https://github.com/WordPress/gutenberg/pull/38004))
|
155 |
+
* Fix back button aria name in customizing widgets tests. ([38195](https://github.com/WordPress/gutenberg/pull/38195))
|
156 |
+
|
157 |
+
#### Mobile
|
158 |
+
|
159 |
+
* Mobile - Highlight text - Force format for some edge cases. ([37915](https://github.com/WordPress/gutenberg/pull/37915))
|
160 |
+
* Send non-deprecated language tags from Android in initialProps. ([37565](https://github.com/WordPress/gutenberg/pull/37565))
|
161 |
+
* Wrap long cell labels on Android. ([37993](https://github.com/WordPress/gutenberg/pull/37993))
|
162 |
+
|
163 |
+
### Performance
|
164 |
+
|
165 |
+
#### Plugin
|
166 |
+
|
167 |
+
* Don't use WP_Query::Get_posts directly. ([38104](https://github.com/WordPress/gutenberg/pull/38104))
|
168 |
+
|
169 |
+
#### Components
|
170 |
+
|
171 |
+
* ToolsPanel: Memoize callbacks and context to prevent unnecessary rerenders. ([38037](https://github.com/WordPress/gutenberg/pull/38037))
|
172 |
+
|
173 |
+
### Documentation
|
174 |
+
|
175 |
+
* Add anchors to all terms of the glossary. ([38073](https://github.com/WordPress/gutenberg/pull/38073))
|
176 |
+
* Add documentation for useBlockEditContext hook. ([36299](https://github.com/WordPress/gutenberg/pull/36299))
|
177 |
+
* Add note about "local styles" in the glossary. ([38083](https://github.com/WordPress/gutenberg/pull/38083))
|
178 |
+
* Add some terms related to styles to the glossary. ([38076](https://github.com/WordPress/gutenberg/pull/38076))
|
179 |
+
* Add theme.json v1 reference and v1 to v2 migration documentation. ([37886](https://github.com/WordPress/gutenberg/pull/37886))
|
180 |
+
* Block API Reference: Fix 'isSelected' property type. ([38161](https://github.com/WordPress/gutenberg/pull/38161))
|
181 |
+
* Capitalise the GitHub wordmark correctly in the Wordpress Gutenberg project. ([38092](https://github.com/WordPress/gutenberg/pull/38092))
|
182 |
+
* Component: Update color-picker documentation. ([38010](https://github.com/WordPress/gutenberg/pull/38010))
|
183 |
+
* Document that `__experimentalSelector` requires server-side block registration. ([37984](https://github.com/WordPress/gutenberg/pull/37984))
|
184 |
+
* Document the Global Styles Presets. ([38129](https://github.com/WordPress/gutenberg/pull/38129))
|
185 |
+
* Fix documentation regression. ([38235](https://github.com/WordPress/gutenberg/pull/38235))
|
186 |
+
* Include partialRight import from lodash in DimensionControl example. ([38088](https://github.com/WordPress/gutenberg/pull/38088))
|
187 |
+
* Multiple typos fixed. ([38071](https://github.com/WordPress/gutenberg/pull/38071))
|
188 |
+
* Scripts: Corrected "npm start:Hot" in the README file. ([38178](https://github.com/WordPress/gutenberg/pull/38178))
|
189 |
+
* Update Block Supports Documentation to better reflect how it works. ([37847](https://github.com/WordPress/gutenberg/pull/37847))
|
190 |
+
* Update BlockPreview component readme. ([38209](https://github.com/WordPress/gutenberg/pull/38209))
|
191 |
+
* Update versions for 5.8.2 and 5.8.3\. ([37924](https://github.com/WordPress/gutenberg/pull/37924))
|
192 |
+
* Use consistent punctuation, capitalization in templateParts documentation. ([38193](https://github.com/WordPress/gutenberg/pull/38193))
|
193 |
+
* [Type] Documentation Updating Faq.md typo. ([38154](https://github.com/WordPress/gutenberg/pull/38154))
|
194 |
+
|
195 |
+
### Code Quality
|
196 |
+
|
197 |
+
* Compose: Rework types of createHigherOrderComponent for closer match to API. ([37795](https://github.com/WordPress/gutenberg/pull/37795))
|
198 |
+
* Docblock typos. ([38067](https://github.com/WordPress/gutenberg/pull/38067))
|
199 |
+
* Fix two inline typos. ([38048](https://github.com/WordPress/gutenberg/pull/38048))
|
200 |
+
* Testing: Upgrade Jest to v27\. ([33287](https://github.com/WordPress/gutenberg/pull/33287))
|
201 |
+
* Add a missing `@since` tag. ([38151](https://github.com/WordPress/gutenberg/pull/38151))
|
202 |
+
* Ignore local environment .tool-versions configuration file. ([38013](https://github.com/WordPress/gutenberg/pull/38013))
|
203 |
+
* Add allowed-plugins in composer configuration. ([38085](https://github.com/WordPress/gutenberg/pull/38085))
|
204 |
+
* Site editor - try redirecting to homepage before the react render. ([37248](https://github.com/WordPress/gutenberg/pull/37248))
|
205 |
+
|
206 |
+
#### Block Library
|
207 |
+
|
208 |
+
* Allow for HTML in `get_the_title`. ([38145](https://github.com/WordPress/gutenberg/pull/38145))
|
209 |
+
* Fix double escaping in blocks. ([37985](https://github.com/WordPress/gutenberg/pull/37985))
|
210 |
+
* Late escape Latest Posts block. ([37866](https://github.com/WordPress/gutenberg/pull/37866))
|
211 |
+
* Late escape Navigation blocks. ([37870](https://github.com/WordPress/gutenberg/pull/37870))
|
212 |
+
* Late escape Post blocks. ([37876](https://github.com/WordPress/gutenberg/pull/37876))
|
213 |
+
* Late escape Social block. ([37881](https://github.com/WordPress/gutenberg/pull/37881))
|
214 |
+
* Late escape comment blocks. ([37860](https://github.com/WordPress/gutenberg/pull/37860))
|
215 |
+
* Late escape comments link block. ([37875](https://github.com/WordPress/gutenberg/pull/37875))
|
216 |
+
* Late escape latest comments block. ([37865](https://github.com/WordPress/gutenberg/pull/37865))
|
217 |
+
* Late escape post author blocks. ([37874](https://github.com/WordPress/gutenberg/pull/37874))
|
218 |
+
* Late escape site blocks. ([37880](https://github.com/WordPress/gutenberg/pull/37880))
|
219 |
+
* Spacer: No need to use withDispatch HOC. ([38206](https://github.com/WordPress/gutenberg/pull/38206))
|
220 |
+
|
221 |
+
### Tools
|
222 |
+
|
223 |
+
* Bump dot-prop from 4.2.0 to 4.2.1\. ([38101](https://github.com/WordPress/gutenberg/pull/38101))
|
224 |
+
* Bump ini from 1.3.5 to 1.3.8\. ([38106](https://github.com/WordPress/gutenberg/pull/38106))
|
225 |
+
* Bump tar from 4.4.13 to 4.4.19\. ([37917](https://github.com/WordPress/gutenberg/pull/37917))
|
226 |
+
* Bump tree-kill from 1.2.0 to 1.2.2\. ([38102](https://github.com/WordPress/gutenberg/pull/38102))
|
227 |
+
* Bump trim-off-newlines from 1.0.1 to 1.0.3\. ([38095](https://github.com/WordPress/gutenberg/pull/38095))
|
228 |
+
* Update MiniCSSExtractPlugin to version 2.5.1\. ([38027](https://github.com/WordPress/gutenberg/pull/38027))
|
229 |
+
* Bump follow-redirects from 1.14.1 to 1.14.7\. ([37957](https://github.com/WordPress/gutenberg/pull/37957))
|
230 |
+
* Bump handlebars from 4.7.6 to 4.7.7\. ([38054](https://github.com/WordPress/gutenberg/pull/38054))
|
231 |
+
* Bump path-parse from 1.0.5 to 1.0.7\. ([37990](https://github.com/WordPress/gutenberg/pull/37990))
|
232 |
+
* Bump tmpl from 1.0.4 to 1.0.5\. ([37916](https://github.com/WordPress/gutenberg/pull/37916))
|
233 |
+
* Add '.git-blame-ignore-revs' to the project. ([37822](https://github.com/WordPress/gutenberg/pull/37822))
|
234 |
+
* Require stylelint v14 for stylelint configuration and scripts. ([38091](https://github.com/WordPress/gutenberg/pull/38091))
|
235 |
+
* Tested up to WP 5.9\. ([38162](https://github.com/WordPress/gutenberg/pull/38162))
|
236 |
+
|
237 |
+
#### Testing
|
238 |
+
|
239 |
+
* Fix flaky Nav block user permissions end-to-end test. ([38025](https://github.com/WordPress/gutenberg/pull/38025))
|
240 |
+
* Fix flaky classic block conversion undo test. ([37933](https://github.com/WordPress/gutenberg/pull/37933))
|
241 |
+
* Improve flaky draft creation navigation block end-to-end test. ([37931](https://github.com/WordPress/gutenberg/pull/37931))
|
242 |
+
* Skip flaky nav permissions test until fixed. ([38099](https://github.com/WordPress/gutenberg/pull/38099))
|
243 |
+
* [docgen] Refactor code to use require() instead of JSON.parse(fs.readFileSync()). ([38148](https://github.com/WordPress/gutenberg/pull/38148))
|
244 |
+
* end-to-end Tests: Add coverage for reusable blocks save button state regression. ([33151](https://github.com/WordPress/gutenberg/pull/33151))
|
245 |
+
* Add new Testing Instructions section to PR template. ([38147](https://github.com/WordPress/gutenberg/pull/38147))
|
246 |
+
|
247 |
+
|
248 |
|
249 |
|
250 |
= 12.4.1 =
|
gutenberg.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
|
6 |
* Requires at least: 5.7
|
7 |
* Requires PHP: 5.6
|
8 |
-
* Version: 12.5.
|
9 |
* Author: Gutenberg Team
|
10 |
* Text Domain: gutenberg
|
11 |
*
|
@@ -13,8 +13,8 @@
|
|
13 |
*/
|
14 |
|
15 |
### BEGIN AUTO-GENERATED DEFINES
|
16 |
-
define( 'GUTENBERG_VERSION', '12.5.
|
17 |
-
define( 'GUTENBERG_GIT_COMMIT', '
|
18 |
### END AUTO-GENERATED DEFINES
|
19 |
|
20 |
gutenberg_pre_init();
|
5 |
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
|
6 |
* Requires at least: 5.7
|
7 |
* Requires PHP: 5.6
|
8 |
+
* Version: 12.5.1
|
9 |
* Author: Gutenberg Team
|
10 |
* Text Domain: gutenberg
|
11 |
*
|
13 |
*/
|
14 |
|
15 |
### BEGIN AUTO-GENERATED DEFINES
|
16 |
+
define( 'GUTENBERG_VERSION', '12.5.1' );
|
17 |
+
define( 'GUTENBERG_GIT_COMMIT', '738751af40eb08bcf21424567dba26bccb42a7b5' );
|
18 |
### END AUTO-GENERATED DEFINES
|
19 |
|
20 |
gutenberg_pre_init();
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== Gutenberg ===
|
2 |
Contributors: matveb, joen, karmatosed
|
3 |
Tested up to: 5.9
|
4 |
-
Stable tag: 12.
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
|
@@ -56,4 +56,4 @@ The four phases of the project are Editing, Customization, Collaboration, and Mu
|
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
-
To read the changelog for Gutenberg 12.5.
|
1 |
=== Gutenberg ===
|
2 |
Contributors: matveb, joen, karmatosed
|
3 |
Tested up to: 5.9
|
4 |
+
Stable tag: 12.5.0
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
+
To read the changelog for Gutenberg 12.5.1, please navigate to the <a href="https://github.com/WordPress/gutenberg/releases/tag/v12.5.1">release page</a>.
|