: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
return select(external_wp_editor_namespaceObject.store).isPublishSidebarOpened();
* 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.
const isEditorPanelRemoved = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, panelName) => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelRemoved`, {
alternative: `select( 'core/editor' ).isEditorPanelRemoved`
return select(external_wp_editor_namespaceObject.store).isEditorPanelRemoved(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) => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelEnabled`, {
alternative: `select( 'core/editor' ).isEditorPanelEnabled`
return select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(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) => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelOpened`, {
alternative: `select( 'core/editor' ).isEditorPanelOpened`
return select(external_wp_editor_namespaceObject.store).isEditorPanelOpened(panelName);
* Returns true if a modal is active, or false otherwise.
* @deprecated since WP 6.3 use `core/interface` store's selector with the same name instead.
* @param {Object} state Global application state.
* @param {string} modalName A string that uniquely identifies the modal.
* @return {boolean} Whether the modal is active.
const isModalActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, modalName) => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isModalActive`, {
alternative: `select( 'core/interface' ).isModalActive`
return !!select(selectors_interfaceStore).isModalActive(modalName);
* Returns whether the given feature is enabled or not.
* @param {Object} state Global application state.
* @param {string} feature Feature slug.
* @return {boolean} Is active.
const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, feature) => {
return !!select(external_wp_preferences_namespaceObject.store).get('core/edit-post', feature);
* Returns true if the plugin item is pinned to the header.
* When the value is not set it defaults to true.
* @param {Object} state Global application state.
* @param {string} pluginName Plugin item name.
* @return {boolean} Whether the plugin item is pinned.
const isPluginItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, pluginName) => {
return select(selectors_interfaceStore).isItemPinned('core', pluginName);
* Returns an array of active meta box locations.
* @param {Object} state Post editor state.
* @return {string[]} Active meta box locations.
const getActiveMetaBoxLocations = (0,external_wp_data_namespaceObject.createSelector)(state => {
return Object.keys(state.metaBoxes.locations).filter(location => isMetaBoxLocationActive(state, location));
}, state => [state.metaBoxes.locations]);
* Returns true if a metabox location is active and visible
* @param {Object} state Post editor state.
* @param {string} location Meta box location to test.
* @return {boolean} Whether the meta box location is active and visible.
const isMetaBoxLocationVisible = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, location) => {
return isMetaBoxLocationActive(state, location) && getMetaBoxesPerLocation(state, location)?.some(({
return select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(state, `meta-box-${id}`);
* Returns true if there is an active meta box in the given location, or false
* @param {Object} state Post editor state.
* @param {string} location Meta box location to test.
* @return {boolean} Whether the meta box location is active.
function isMetaBoxLocationActive(state, location) {
const metaBoxes = getMetaBoxesPerLocation(state, location);
return !!metaBoxes && metaBoxes.length !== 0;
* Returns the list of all the available meta boxes for a given location.
* @param {Object} state Global application state.
* @param {string} location Meta box location to test.
* @return {?Array} List of meta boxes.
function getMetaBoxesPerLocation(state, location) {
return state.metaBoxes.locations[location];
* Returns the list of all the available meta boxes.
* @param {Object} state Global application state.
* @return {Array} List of meta boxes.
const getAllMetaBoxes = (0,external_wp_data_namespaceObject.createSelector)(state => {
return Object.values(state.metaBoxes.locations).flat();
}, state => [state.metaBoxes.locations]);
* Returns true if the post is using Meta Boxes
* @param {Object} state Global application state
* @return {boolean} Whether there are metaboxes or not.
function hasMetaBoxes(state) {
return getActiveMetaBoxLocations(state).length > 0;
* Returns true if the Meta Boxes are being saved.
* @param {Object} state Global application state.
* @return {boolean} Whether the metaboxes are being saved.
function selectors_isSavingMetaBoxes(state) {
return state.metaBoxes.isSaving;
* Returns the current editing canvas device type.
* @param {Object} state Global application state.
* @return {string} Device type.
const __experimentalGetPreviewDeviceType = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`, {
alternative: `select( 'core/editor' ).getDeviceType`
return select(external_wp_editor_namespaceObject.store).getDeviceType();
* Returns true if the inserter is opened.
* @param {Object} state Global application state.
* @return {boolean} Whether the inserter is opened.
const isInserterOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isInserterOpened`, {
alternative: `select( 'core/editor' ).isInserterOpened`
return select(external_wp_editor_namespaceObject.store).isInserterOpened();
* Get the insertion point for the inserter.
* @param {Object} state Global application state.
* @return {Object} The root client ID, index to insert at and starting filter value.
const __experimentalGetInsertionPoint = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).__experimentalGetInsertionPoint`, {
return unlock(select(external_wp_editor_namespaceObject.store)).getInsertionPoint();
* Returns true if the list view is opened.
* @param {Object} state Global application state.
* @return {boolean} Whether the list view is opened.
const isListViewOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isListViewOpened`, {
alternative: `select( 'core/editor' ).isListViewOpened`
return select(external_wp_editor_namespaceObject.store).isListViewOpened();
* Returns true if the template editing mode is enabled.
const isEditingTemplate = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditingTemplate`, {
alternative: `select( 'core/editor' ).getRenderingMode`
return select(external_wp_editor_namespaceObject.store).getCurrentPostType() === 'wp_template';
* Returns true if meta boxes are initialized.
* @param {Object} state Global application state.
* @return {boolean} Whether meta boxes are initialized.
function areMetaBoxesInitialized(state) {
return state.metaBoxes.initialized;
* Retrieves the template of the currently edited post.
* @return {Object?} Post Template.
const getEditedPostTemplate = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
} = select(external_wp_editor_namespaceObject.store).getCurrentPost();
} = select(external_wp_coreData_namespaceObject.store);
const siteSettings = getSite();
// First check if the current page is set as the posts page.
const isPostsPage = +postId === siteSettings?.page_for_posts;
const defaultTemplateId = select(external_wp_coreData_namespaceObject.store).getDefaultTemplateId({
return getEditedEntityRecord('postType', 'wp_template', defaultTemplateId);
const currentTemplate = select(external_wp_editor_namespaceObject.store).getEditedPostAttribute('template');
const templateWithSameSlug = getEntityRecords('postType', 'wp_template', {
})?.find(template => template.slug === currentTemplate);
if (!templateWithSameSlug) {
return templateWithSameSlug;
return getEditedEntityRecord('postType', 'wp_template', templateWithSameSlug.id);
// In `draft` status we might not have a slug available, so we use the `single`
// post type templates slug(ex page, single-post, single-product etc..).
// Pages do not need the `single` prefix in the slug to be prioritized
// through template hierarchy.
slugToCheck = postType === 'page' ? `${postType}-${slug}` : `single-${postType}-${slug}`;
slugToCheck = postType === 'page' ? 'page' : `single-${postType}`;
const defaultTemplateId = select(external_wp_coreData_namespaceObject.store).getDefaultTemplateId({
return defaultTemplateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', 'wp_template', defaultTemplateId) : null;
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/constants.js
* The identifier for the data store.
const STORE_NAME = 'core/edit-post';
* CSS selector string for the admin bar view post link anchor tag.
const VIEW_AS_LINK_SELECTOR = '#wp-admin-bar-view a';
* CSS selector string for the admin bar preview post link anchor tag.
const VIEW_AS_PREVIEW_LINK_SELECTOR = '#wp-admin-bar-preview a';
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js
* Store definition for the edit post namespace.
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
actions: actions_namespaceObject,
selectors: selectors_namespaceObject
(0,external_wp_data_namespaceObject.register)(store);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/back-button/fullscreen-mode-close.js
function FullscreenModeClose({
var _postType$labels$view;
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_editor_namespaceObject.store);
} = select(external_wp_coreData_namespaceObject.store);
const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
const _postType = initialPost?.type || getCurrentPostType();
isActive: isFeatureActive('fullscreenMode'),
isRequestingSiteIcon: isResolving('getEntityRecord', ['root', '__unstableBase', undefined]),
postType: getPostType(_postType),
siteIconUrl: siteData.site_icon_url
const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
if (!isActive || !postType) {
let buttonIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
buttonIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.img, {
variants: !disableMotion && effect,
alt: (0,external_wp_i18n_namespaceObject.__)('Site Icon'),
className: "edit-post-fullscreen-mode-close_site-icon",
if (isRequestingSiteIcon) {
// Override default icon if custom icon is provided via props.
buttonIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
const classes = dist_clsx({
'edit-post-fullscreen-mode-close': true,
const buttonHref = href !== null && href !== void 0 ? href : (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
const buttonLabel = (_postType$labels$view = postType?.labels?.view_items) !== null && _postType$labels$view !== void 0 ? _postType$labels$view : (0,external_wp_i18n_namespaceObject.__)('Back');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
showTooltip: showTooltip,
/* harmony default export */ const fullscreen_mode_close = (FullscreenModeClose);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/back-button/index.js