: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
}, [postType, blockPatternsWithPostContentBlockType]);
function PatternSelection({
const shownBlockPatterns = (0,external_wp_compose_namespaceObject.useAsyncList)(blockPatterns);
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
postType: getCurrentPostType(),
postId: getCurrentPostId()
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, {
blockPatterns: blockPatterns,
shownPatterns: shownBlockPatterns,
onClickPattern: (_pattern, blocks) => {
editEntityRecord('postType', postType, postId, {
blocks: blocksForSerialization = []
}) => (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(blocksForSerialization)
function StartPageOptionsModal({
const startPatterns = useStartPatterns();
const hasStartPattern = startPatterns.length > 0;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Choose a pattern'),
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "editor-start-page-options__modal-content",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternSelection, {
blockPatterns: startPatterns,
function StartPageOptions() {
const [isClosed, setIsClosed] = (0,external_wp_element_namespaceObject.useState)(false);
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const _postType = getCurrentPostType();
shouldEnableModal: !isEditedPostDirty() && isEditedPostEmpty() && TEMPLATE_POST_TYPE !== _postType,
postId: getCurrentPostId()
(0,external_wp_element_namespaceObject.useEffect)(() => {
// Should reset the modal state when navigating to a new page/post.
if (!shouldEnableModal || isClosed) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StartPageOptionsModal, {
onClose: () => setIsClosed(true)
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/keyboard-shortcut-help-modal/config.js
const textFormattingShortcuts = [{
description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text bold.')
description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text italic.')
description: (0,external_wp_i18n_namespaceObject.__)('Convert the selected text into a link.')
modifier: 'primaryShift',
description: (0,external_wp_i18n_namespaceObject.__)('Remove a link.')
description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page.')
description: (0,external_wp_i18n_namespaceObject.__)('Underline the selected text.')
description: (0,external_wp_i18n_namespaceObject.__)('Strikethrough the selected text.')
description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text inline code.')
description: (0,external_wp_i18n_namespaceObject.__)('Convert the current heading to a paragraph.')
description: (0,external_wp_i18n_namespaceObject.__)('Convert the current paragraph or heading to a heading of level 1 to 6.')
modifier: 'primaryShift',
description: (0,external_wp_i18n_namespaceObject.__)('Add non breaking space.')
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/keyboard-shortcut-help-modal/shortcut.js
function KeyCombination({
const shortcut = keyCombination.modifier ? external_wp_keycodes_namespaceObject.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
const ariaLabel = keyCombination.modifier ? external_wp_keycodes_namespaceObject.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {
className: "editor-keyboard-shortcut-help-modal__shortcut-key-combination",
"aria-label": forceAriaLabel || ariaLabel,
children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.Fragment, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {
className: "editor-keyboard-shortcut-help-modal__shortcut-key",
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "editor-keyboard-shortcut-help-modal__shortcut-description",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "editor-keyboard-shortcut-help-modal__shortcut-term",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyCombination, {
keyCombination: keyCombination,
forceAriaLabel: ariaLabel
}), aliases.map((alias, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyCombination, {
forceAriaLabel: ariaLabel
/* harmony default export */ const keyboard_shortcut_help_modal_shortcut = (Shortcut);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
function DynamicShortcut({
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
getShortcutKeyCombination,
} = select(external_wp_keyboardShortcuts_namespaceObject.store);
keyCombination: getShortcutKeyCombination(name),
aliases: getShortcutAliases(name),
description: getShortcutDescription(name)
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcut_help_modal_shortcut, {
keyCombination: keyCombination,
description: description,
/* harmony default export */ const dynamic_shortcut = (DynamicShortcut);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/keyboard-shortcut-help-modal/index.js
const KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'editor/keyboard-shortcut-help';
* Disable reason: The `list` ARIA role is redundant but
* Safari+VoiceOver won't announce the list otherwise.
/* eslint-disable jsx-a11y/no-redundant-roles */
(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
className: "editor-keyboard-shortcut-help-modal__shortcut-list",
children: shortcuts.map((shortcut, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
className: "editor-keyboard-shortcut-help-modal__shortcut",
children: typeof shortcut === 'string' ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dynamic_shortcut, {
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcut_help_modal_shortcut, {
/* eslint-enable jsx-a11y/no-redundant-roles */;
const ShortcutSection = ({
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("section", {
className: dist_clsx('editor-keyboard-shortcut-help-modal__section', className),
children: [!!title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
className: "editor-keyboard-shortcut-help-modal__section-title",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutList, {
const ShortcutCategorySection = ({
const categoryShortcuts = (0,external_wp_data_namespaceObject.useSelect)(select => {
return select(external_wp_keyboardShortcuts_namespaceObject.store).getCategoryShortcuts(categoryName);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
shortcuts: categoryShortcuts.concat(additionalShortcuts)
function KeyboardShortcutHelpModal() {
const isModalActive = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isModalActive(KEYBOARD_SHORTCUT_HELP_MODAL_NAME), []);
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const toggleModal = () => {
openModal(KEYBOARD_SHORTCUT_HELP_MODAL_NAME);
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/keyboard-shortcuts', toggleModal);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Modal, {
className: "editor-keyboard-shortcut-help-modal",
title: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'),
closeButtonLabel: (0,external_wp_i18n_namespaceObject.__)('Close'),
onRequestClose: toggleModal,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
className: "editor-keyboard-shortcut-help-modal__main-shortcuts",
shortcuts: ['core/editor/keyboard-shortcuts']
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
title: (0,external_wp_i18n_namespaceObject.__)('Global shortcuts'),
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
title: (0,external_wp_i18n_namespaceObject.__)('Selection shortcuts'),
categoryName: "selection"
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'),
description: (0,external_wp_i18n_namespaceObject.__)('Change the block type after adding a new paragraph.'),
/* translators: The forward-slash character. e.g. '/'. */
ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Forward-slash')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
title: (0,external_wp_i18n_namespaceObject.__)('Text formatting'),
shortcuts: textFormattingShortcuts
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
title: (0,external_wp_i18n_namespaceObject.__)('List View shortcuts'),
categoryName: "list-view"
/* harmony default export */ const keyboard_shortcut_help_modal = (KeyboardShortcutHelpModal);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/content-only-settings-menu.js
function ContentOnlySettingsMenuItems({
onNavigateToEntityRecord,
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
getBlockParentsByBlockName,
} = select(external_wp_blockEditor_namespaceObject.store);
const contentOnly = getBlockEditingMode(clientId) === 'contentOnly';
const patternParent = getBlockParentsByBlockName(clientId, 'core/block', true)[0];
record = select(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', 'wp_block', getBlockAttributes(patternParent).ref);
const templateId = getCurrentTemplateId();
} = unlock(select(external_wp_blockEditor_namespaceObject.store));
if (!getContentLockingParent(clientId) && templateId) {
record = select(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', 'wp_template', templateId);
const _canEditTemplates = select(external_wp_coreData_namespaceObject.store).canUser('create', 'templates');
canEditTemplates: _canEditTemplates,
onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplateLockContentOnlyMenuItems, {
const isPattern = entity.type === 'wp_block';
let helpText = isPattern ? (0,external_wp_i18n_namespaceObject.__)('Edit the pattern to move, delete, or make further changes to this block.') : (0,external_wp_i18n_namespaceObject.__)('Edit the template to move, delete, or make further changes to this block.');
helpText = (0,external_wp_i18n_namespaceObject.__)('Only users with permissions to edit the template can move or delete this block');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
onNavigateToEntityRecord({
disabled: !canEditTemplates,
children: isPattern ? (0,external_wp_i18n_namespaceObject.__)('Edit pattern') : (0,external_wp_i18n_namespaceObject.__)('Edit template')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
className: "editor-content-only-settings-menu__description",
function TemplateLockContentOnlyMenuItems({
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = unlock(select(external_wp_blockEditor_namespaceObject.store));
contentLockingParent: getContentLockingParent(clientId)
const blockDisplayInformation = (0,external_wp_blockEditor_namespaceObject.useBlockDisplayInformation)(contentLockingParent);
// Disable reason: We're using a hook here so it has to be on top-level.
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
} = unlock((0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store));