: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* var PluginPostStatusInfo = wp.editor.PluginPostStatusInfo;
* function MyPluginPostStatusInfo() {
* return React.createElement(
* className: 'my-plugin-post-status-info',
* __( 'My post status info' )
* import { __ } from '@wordpress/i18n';
* import { PluginPostStatusInfo } from '@wordpress/editor';
* const MyPluginPostStatusInfo = () => (
* className="my-plugin-post-status-info"
* { __( 'My post status info' ) }
* </PluginPostStatusInfo>
* @return {Component} The component to be rendered.
const PluginPostStatusInfo = ({
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(plugin_post_status_info_Fill, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelRow, {
PluginPostStatusInfo.Slot = plugin_post_status_info_Slot;
/* harmony default export */ const plugin_post_status_info = (PluginPostStatusInfo);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/plugin-pre-publish-panel/index.js
Fill: plugin_pre_publish_panel_Fill,
Slot: plugin_pre_publish_panel_Slot
} = (0,external_wp_components_namespaceObject.createSlotFill)('PluginPrePublishPanel');
* Renders provided content to the pre-publish side panel in the publish flow
* (side panel that opens when a user first pushes "Publish" from the main editor).
* @param {Object} props Component props.
* @param {string} [props.className] An optional class name added to the panel.
* @param {string} [props.title] Title displayed at the top of the panel.
* @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.
* When no title is provided it is always opened.
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)
* icon slug string, or an SVG WP element, to be rendered when
* the sidebar is pinned to toolbar.
* @param {Element} props.children Children to be rendered
* import { __ } from '@wordpress/i18n';
* import { PluginPrePublishPanel } from '@wordpress/editor';
* const MyPluginPrePublishPanel = () => (
* className="my-plugin-pre-publish-panel"
* title={ __( 'My panel title' ) }
* { __( 'My panel content' ) }
* </PluginPrePublishPanel>
* @return {Component} The component to be rendered.
const PluginPrePublishPanel = ({
} = (0,external_wp_plugins_namespaceObject.usePluginContext)();
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(plugin_pre_publish_panel_Fill, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
initialOpen: initialOpen || !title,
icon: icon !== null && icon !== void 0 ? icon : pluginIcon,
PluginPrePublishPanel.Slot = plugin_pre_publish_panel_Slot;
/* harmony default export */ const plugin_pre_publish_panel = (PluginPrePublishPanel);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/plugin-sidebar/index.js
* Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.
* It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.
* If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:
* wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );
* @see PluginSidebarMoreMenuItem
* @param {Object} props Element props.
* @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.
* @param {string} [props.className] An optional class name added to the sidebar body.
* @param {string} props.title Title displayed at the top of the sidebar.
* @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
* var el = React.createElement;
* var PanelBody = wp.components.PanelBody;
* var PluginSidebar = wp.editor.PluginSidebar;
* var moreIcon = React.createElement( 'svg' ); //... svg element.
* function MyPluginSidebar() {
* title: 'My sidebar title',
* __( 'My sidebar content' )
* import { __ } from '@wordpress/i18n';
* import { PanelBody } from '@wordpress/components';
* import { PluginSidebar } from '@wordpress/editor';
* import { more } from '@wordpress/icons';
* const MyPluginSidebar = () => (
* title="My sidebar title"
* { __( 'My sidebar content' ) }
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
postTitle: select(store_store).getEditedPostAttribute('title'),
shortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getShortcutRepresentation('core/editor/toggle-sidebar')
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area, {
panelClassName: className,
className: "editor-sidebar",
smallScreenTitle: postTitle || (0,external_wp_i18n_namespaceObject.__)('(no title)'),
toggleShortcut: shortcut,
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/plugin-sidebar-more-menu-item/index.js
* Renders a menu item in `Plugins` group in `More Menu` drop down,
* and can be used to activate the corresponding `PluginSidebar` component.
* The text within the component appears as the menu item label.
* @param {Object} props Component props.
* @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
* var PluginSidebarMoreMenuItem = wp.editor.PluginSidebarMoreMenuItem;
* var moreIcon = React.createElement( 'svg' ); //... svg element.
* function MySidebarMoreMenuItem() {
* return React.createElement(
* PluginSidebarMoreMenuItem,
* __( 'My sidebar title' )
* import { __ } from '@wordpress/i18n';
* import { PluginSidebarMoreMenuItem } from '@wordpress/editor';
* import { more } from '@wordpress/icons';
* const MySidebarMoreMenuItem = () => (
* <PluginSidebarMoreMenuItem
* { __( 'My sidebar title' ) }
* </PluginSidebarMoreMenuItem>
* @return {Component} The component to be rendered.
function PluginSidebarMoreMenuItem(props) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryAreaMoreMenuItem
// Menu item is marked with unstable prop for backward compatibility.
// @see https://github.com/WordPress/gutenberg/issues/14457
__unstableExplicitMenuItem: true,
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-template/swap-template-button.js
function SwapTemplateButton({
const [showModal, setShowModal] = (0,external_wp_element_namespaceObject.useState)(false);
} = useEditedPostContext();
const availableTemplates = useAvailableTemplates(postType);
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
if (!availableTemplates?.length) {
const onTemplateSelect = async template => {
editEntityRecord('postType', postType, postId, {
setShowModal(false); // Close the template suggestions modal first.
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
onClick: () => setShowModal(true),
children: (0,external_wp_i18n_namespaceObject.__)('Swap template')
}), showModal && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Choose a template'),
onRequestClose: () => setShowModal(false),
overlayClassName: "editor-post-template__swap-template-modal",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "editor-post-template__swap-template-modal-content",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatesList, {
onSelect: onTemplateSelect
const availableTemplates = useAvailableTemplates(postType);
const templatesAsPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => availableTemplates.map(template => ({
blocks: (0,external_wp_blocks_namespaceObject.parse)(template.content.raw),
title: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title.rendered),
})), [availableTemplates]);
const shownTemplates = (0,external_wp_compose_namespaceObject.useAsyncList)(templatesAsPatterns);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, {
label: (0,external_wp_i18n_namespaceObject.__)('Templates'),
blockPatterns: templatesAsPatterns,
shownPatterns: shownTemplates,
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-template/reset-default-template.js
function ResetDefaultTemplate({
const currentTemplateSlug = useCurrentTemplateSlug();
const allowSwitchingTemplate = useAllowSwitchingTemplates();
} = useEditedPostContext();
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
// The default template in a post is indicated by an empty string.
if (!currentTemplateSlug || !allowSwitchingTemplate) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
editEntityRecord('postType', postType, postId, {
children: (0,external_wp_i18n_namespaceObject.__)('Use default template')
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-template/create-new-template.js
function CreateNewTemplate({
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_coreData_namespaceObject.store);
canCreateTemplates: canUser('create', 'templates')
const [isCreateModalOpen, setIsCreateModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
const allowSwitchingTemplate = useAllowSwitchingTemplates();
// The default template in a post is indicated by an empty string.
if (!canCreateTemplates || !allowSwitchingTemplate) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
setIsCreateModalOpen(true);
children: (0,external_wp_i18n_namespaceObject.__)('Create new template')
}), isCreateModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CreateNewTemplateModal, {
setIsCreateModalOpen(false);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-template/block-theme.js
const block_theme_POPOVER_PROPS = {
className: 'editor-post-template__dropdown',
placement: 'bottom-start'
function BlockThemeControl({
onNavigateToEntityRecord,
} = (0,external_wp_data_namespaceObject.useSelect)(select => {