: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Returns whether the pre-publish panel should be shown
* or skipped when the user clicks the "publish" button.
* @return {boolean} Whether the pre-publish panel should be shown or not.
const isPublishSidebarEnabled = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => !!select(external_wp_preferences_namespaceObject.store).get('core', 'isPublishSidebarEnabled'));
* Return the current block list.
* @return {Array} Block list.
const getEditorBlocks = (0,external_wp_data_namespaceObject.createSelector)(state => {
return getEditedPostAttribute(state, 'blocks') || (0,external_wp_blocks_namespaceObject.parse)(getEditedPostContent(state));
}, state => [getEditedPostAttribute(state, 'blocks'), getEditedPostContent(state)]);
* Returns true if the given panel was programmatically removed, or false otherwise.
* All panels are not removed by default.
* @param {Object} state Global application state.
* @param {string} panelName A string that identifies the panel.
* @return {boolean} Whether or not the panel is removed.
function isEditorPanelRemoved(state, panelName) {
return state.removedPanels.includes(panelName);
* Returns true if the given panel is enabled, or false otherwise. Panels are
* @param {Object} state Global application state.
* @param {string} panelName A string that identifies the panel.
* @return {boolean} Whether or not the panel is enabled.
const isEditorPanelEnabled = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, panelName) => {
// For backward compatibility, we check edit-post
// even though now this is in "editor" package.
const inactivePanels = select(external_wp_preferences_namespaceObject.store).get('core', 'inactivePanels');
return !isEditorPanelRemoved(state, panelName) && !inactivePanels?.includes(panelName);
* Returns true if the given panel is open, or false otherwise. Panels are
* @param {Object} state Global application state.
* @param {string} panelName A string that identifies the panel.
* @return {boolean} Whether or not the panel is open.
const isEditorPanelOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, panelName) => {
// For backward compatibility, we check edit-post
// even though now this is in "editor" package.
const openPanels = select(external_wp_preferences_namespaceObject.store).get('core', 'openPanels');
return !!openPanels?.includes(panelName);
* A block selection object.
* @typedef {Object} WPBlockSelection
* @property {string} clientId A block client ID.
* @property {string} attributeKey A block attribute key.
* @property {number} offset An attribute value offset, based on the rich
* text value. See `wp.richText.create`.
* Returns the current selection start.
* @return {WPBlockSelection} The selection start.
* @deprecated since Gutenberg 10.0.0.
function getEditorSelectionStart(state) {
external_wp_deprecated_default()("select('core/editor').getEditorSelectionStart", {
alternative: "select('core/editor').getEditorSelection"
return getEditedPostAttribute(state, 'selection')?.selectionStart;
* Returns the current selection end.
* @return {WPBlockSelection} The selection end.
* @deprecated since Gutenberg 10.0.0.
function getEditorSelectionEnd(state) {
external_wp_deprecated_default()("select('core/editor').getEditorSelectionStart", {
alternative: "select('core/editor').getEditorSelection"
return getEditedPostAttribute(state, 'selection')?.selectionEnd;
* Returns the current selection.
* @return {WPBlockSelection} The selection end.
function getEditorSelection(state) {
return getEditedPostAttribute(state, 'selection');
* @return {boolean} is Ready.
function __unstableIsEditorReady(state) {
* Returns the post editor settings.
* @param {Object} state Editor state.
* @return {Object} The editor settings object.
function getEditorSettings(state) {
return state.editorSettings;
* Returns the post editor's rendering mode.
* @param {Object} state Editor state.
* @return {string} Rendering mode.
function getRenderingMode(state) {
return state.renderingMode;
* Returns the current editing canvas device type.
* @param {Object} state Global application state.
* @return {string} Device type.
function getDeviceType(state) {
* Returns true if the list view is opened.
* @param {Object} state Global application state.
* @return {boolean} Whether the list view is opened.
function isListViewOpened(state) {
return state.listViewPanel;
* Returns true if the inserter is opened.
* @param {Object} state Global application state.
* @return {boolean} Whether the inserter is opened.
function isInserterOpened(state) {
return !!state.blockInserterPanel;
* Returns the current editing mode.
* @param {Object} state Global application state.
* @return {string} Editing mode.
const getEditorMode = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
return (_select$get = select(external_wp_preferences_namespaceObject.store).get('core', 'editorMode')) !== null && _select$get !== void 0 ? _select$get : 'visual';
* Returns state object prior to a specified optimist transaction ID, or `null`
* if the transaction corresponding to the given ID cannot be found.
* @deprecated since Gutenberg 9.7.0.
function getStateBeforeOptimisticTransaction() {
external_wp_deprecated_default()("select('core/editor').getStateBeforeOptimisticTransaction", {
hint: 'No state history is kept on this store anymore'
* Returns true if an optimistic transaction is pending commit, for which the
* before state satisfies the given predicate function.
* @deprecated since Gutenberg 9.7.0.
function inSomeHistory() {
external_wp_deprecated_default()("select('core/editor').inSomeHistory", {
hint: 'No state history is kept on this store anymore'
function getBlockEditorSelector(name) {
return (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, ...args) => {
external_wp_deprecated_default()("`wp.data.select( 'core/editor' )." + name + '`', {
alternative: "`wp.data.select( 'core/block-editor' )." + name + '`',
return select(external_wp_blockEditor_namespaceObject.store)[name](...args);
* @see getBlockName in core/block-editor store.
const getBlockName = getBlockEditorSelector('getBlockName');
* @see isBlockValid in core/block-editor store.
const isBlockValid = getBlockEditorSelector('isBlockValid');
* @see getBlockAttributes in core/block-editor store.
const getBlockAttributes = getBlockEditorSelector('getBlockAttributes');
* @see getBlock in core/block-editor store.
const getBlock = getBlockEditorSelector('getBlock');
* @see getBlocks in core/block-editor store.
const getBlocks = getBlockEditorSelector('getBlocks');
* @see getClientIdsOfDescendants in core/block-editor store.
const getClientIdsOfDescendants = getBlockEditorSelector('getClientIdsOfDescendants');
* @see getClientIdsWithDescendants in core/block-editor store.
const getClientIdsWithDescendants = getBlockEditorSelector('getClientIdsWithDescendants');
* @see getGlobalBlockCount in core/block-editor store.
const getGlobalBlockCount = getBlockEditorSelector('getGlobalBlockCount');
* @see getBlocksByClientId in core/block-editor store.
const getBlocksByClientId = getBlockEditorSelector('getBlocksByClientId');
* @see getBlockCount in core/block-editor store.
const getBlockCount = getBlockEditorSelector('getBlockCount');
* @see getBlockSelectionStart in core/block-editor store.
const getBlockSelectionStart = getBlockEditorSelector('getBlockSelectionStart');
* @see getBlockSelectionEnd in core/block-editor store.
const getBlockSelectionEnd = getBlockEditorSelector('getBlockSelectionEnd');
* @see getSelectedBlockCount in core/block-editor store.
const getSelectedBlockCount = getBlockEditorSelector('getSelectedBlockCount');
* @see hasSelectedBlock in core/block-editor store.
const hasSelectedBlock = getBlockEditorSelector('hasSelectedBlock');
* @see getSelectedBlockClientId in core/block-editor store.
const getSelectedBlockClientId = getBlockEditorSelector('getSelectedBlockClientId');
* @see getSelectedBlock in core/block-editor store.
const getSelectedBlock = getBlockEditorSelector('getSelectedBlock');
* @see getBlockRootClientId in core/block-editor store.
const getBlockRootClientId = getBlockEditorSelector('getBlockRootClientId');
* @see getBlockHierarchyRootClientId in core/block-editor store.
const getBlockHierarchyRootClientId = getBlockEditorSelector('getBlockHierarchyRootClientId');
* @see getAdjacentBlockClientId in core/block-editor store.
const getAdjacentBlockClientId = getBlockEditorSelector('getAdjacentBlockClientId');
* @see getPreviousBlockClientId in core/block-editor store.
const getPreviousBlockClientId = getBlockEditorSelector('getPreviousBlockClientId');
* @see getNextBlockClientId in core/block-editor store.
const getNextBlockClientId = getBlockEditorSelector('getNextBlockClientId');
* @see getSelectedBlocksInitialCaretPosition in core/block-editor store.
const getSelectedBlocksInitialCaretPosition = getBlockEditorSelector('getSelectedBlocksInitialCaretPosition');
* @see getMultiSelectedBlockClientIds in core/block-editor store.
const getMultiSelectedBlockClientIds = getBlockEditorSelector('getMultiSelectedBlockClientIds');
* @see getMultiSelectedBlocks in core/block-editor store.
const getMultiSelectedBlocks = getBlockEditorSelector('getMultiSelectedBlocks');
* @see getFirstMultiSelectedBlockClientId in core/block-editor store.
const getFirstMultiSelectedBlockClientId = getBlockEditorSelector('getFirstMultiSelectedBlockClientId');
* @see getLastMultiSelectedBlockClientId in core/block-editor store.
const getLastMultiSelectedBlockClientId = getBlockEditorSelector('getLastMultiSelectedBlockClientId');
* @see isFirstMultiSelectedBlock in core/block-editor store.
const isFirstMultiSelectedBlock = getBlockEditorSelector('isFirstMultiSelectedBlock');
* @see isBlockMultiSelected in core/block-editor store.
const isBlockMultiSelected = getBlockEditorSelector('isBlockMultiSelected');
* @see isAncestorMultiSelected in core/block-editor store.
const isAncestorMultiSelected = getBlockEditorSelector('isAncestorMultiSelected');
* @see getMultiSelectedBlocksStartClientId in core/block-editor store.
const getMultiSelectedBlocksStartClientId = getBlockEditorSelector('getMultiSelectedBlocksStartClientId');
* @see getMultiSelectedBlocksEndClientId in core/block-editor store.
const getMultiSelectedBlocksEndClientId = getBlockEditorSelector('getMultiSelectedBlocksEndClientId');
* @see getBlockOrder in core/block-editor store.
const getBlockOrder = getBlockEditorSelector('getBlockOrder');
* @see getBlockIndex in core/block-editor store.
const getBlockIndex = getBlockEditorSelector('getBlockIndex');
* @see isBlockSelected in core/block-editor store.
const isBlockSelected = getBlockEditorSelector('isBlockSelected');
* @see hasSelectedInnerBlock in core/block-editor store.
const hasSelectedInnerBlock = getBlockEditorSelector('hasSelectedInnerBlock');
* @see isBlockWithinSelection in core/block-editor store.
const isBlockWithinSelection = getBlockEditorSelector('isBlockWithinSelection');
* @see hasMultiSelection in core/block-editor store.
const hasMultiSelection = getBlockEditorSelector('hasMultiSelection');
* @see isMultiSelecting in core/block-editor store.
const isMultiSelecting = getBlockEditorSelector('isMultiSelecting');
* @see isSelectionEnabled in core/block-editor store.
const isSelectionEnabled = getBlockEditorSelector('isSelectionEnabled');
* @see getBlockMode in core/block-editor store.
const getBlockMode = getBlockEditorSelector('getBlockMode');
* @see isTyping in core/block-editor store.
const isTyping = getBlockEditorSelector('isTyping');
* @see isCaretWithinFormattedText in core/block-editor store.
const isCaretWithinFormattedText = getBlockEditorSelector('isCaretWithinFormattedText');
* @see getBlockInsertionPoint in core/block-editor store.
const getBlockInsertionPoint = getBlockEditorSelector('getBlockInsertionPoint');
* @see isBlockInsertionPointVisible in core/block-editor store.
const isBlockInsertionPointVisible = getBlockEditorSelector('isBlockInsertionPointVisible');
* @see isValidTemplate in core/block-editor store.
const isValidTemplate = getBlockEditorSelector('isValidTemplate');
* @see getTemplate in core/block-editor store.
const getTemplate = getBlockEditorSelector('getTemplate');
* @see getTemplateLock in core/block-editor store.
const getTemplateLock = getBlockEditorSelector('getTemplateLock');
* @see canInsertBlockType in core/block-editor store.
const canInsertBlockType = getBlockEditorSelector('canInsertBlockType');
* @see getInserterItems in core/block-editor store.
const getInserterItems = getBlockEditorSelector('getInserterItems');
* @see hasInserterItems in core/block-editor store.
const hasInserterItems = getBlockEditorSelector('hasInserterItems');
* @see getBlockListSettings in core/block-editor store.
const getBlockListSettings = getBlockEditorSelector('getBlockListSettings');
* Returns the default template types.
* @param {Object} state Global application state.
* @return {Object} The template types.
function __experimentalGetDefaultTemplateTypes(state) {
return getEditorSettings(state)?.defaultTemplateTypes;