: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if (postType !== 'wp_block') {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_panel_row, {
label: (0,external_wp_i18n_namespaceObject.__)('Sync status'),
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "editor-post-sync-status__value",
children: syncStatus === 'unsynced' ? (0,external_wp_i18n_namespaceObject._x)('Not synced', 'pattern (singular)') : (0,external_wp_i18n_namespaceObject._x)('Synced', 'pattern (singular)')
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/index.js
const post_taxonomies_identity = x => x;
function PostTaxonomies({
taxonomyWrapper = post_taxonomies_identity
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
postType: select(store_store).getCurrentPostType(),
taxonomies: select(external_wp_coreData_namespaceObject.store).getTaxonomies({
const visibleTaxonomies = (taxonomies !== null && taxonomies !== void 0 ? taxonomies : []).filter(taxonomy =>
// In some circumstances .visibility can end up as undefined so optional chaining operator required.
// https://github.com/WordPress/gutenberg/issues/40326
taxonomy.types.includes(postType) && taxonomy.visibility?.show_ui);
return visibleTaxonomies.map(taxonomy => {
const TaxonomyComponent = taxonomy.hierarchical ? hierarchical_term_selector : flat_term_selector;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.Fragment, {
children: taxonomyWrapper( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TaxonomyComponent, {
}, `taxonomy-${taxonomy.slug}`);
/* harmony default export */ const post_taxonomies = (PostTaxonomies);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/check.js
function PostTaxonomiesCheck({
const hasTaxonomies = (0,external_wp_data_namespaceObject.useSelect)(select => {
const postType = select(store_store).getCurrentPostType();
const taxonomies = select(external_wp_coreData_namespaceObject.store).getTaxonomies({
return taxonomies?.some(taxonomy => taxonomy.types.includes(postType));
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/panel.js
const slug = taxonomy?.slug;
const panelName = slug ? `taxonomy-panel-${slug}` : '';
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
isEnabled: slug ? isEditorPanelEnabled(panelName) : false,
isOpened: slug ? isEditorPanelOpened(panelName) : false
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
const taxonomyMenuName = taxonomy?.labels?.menu_name;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
onToggle: () => toggleEditorPanelOpened(panelName),
function panel_PostTaxonomies() {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostTaxonomiesCheck, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_taxonomies, {
taxonomyWrapper: (content, taxonomy) => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TaxonomyPanel, {
/* harmony default export */ const post_taxonomies_panel = (panel_PostTaxonomies);
// EXTERNAL MODULE: ./node_modules/react-autosize-textarea/lib/index.js
var lib = __webpack_require__(4132);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-text-editor/index.js
* Displays the Post Text Editor along with content in Visual and Text mode.
* @return {JSX.Element|null} The rendered PostTextEditor component.
function PostTextEditor() {
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(PostTextEditor);
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_coreData_namespaceObject.store);
const _type = getCurrentPostType();
const _id = getCurrentPostId();
const editedRecord = getEditedEntityRecord('postType', _type, _id);
content: editedRecord?.content,
blocks: editedRecord?.blocks,
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
// Replicates the logic found in getEditedPostContent().
const value = (0,external_wp_element_namespaceObject.useMemo)(() => {
if (content instanceof Function) {
// If we have parsed blocks already, they should be our source of truth.
// Parsing applies block deprecations and legacy block conversions that
// unparsed content will not have.
return (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(blocks);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
htmlFor: `post-content-${instanceId}`,
children: (0,external_wp_i18n_namespaceObject.__)('Type text or HTML')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(lib/* default */.A, {
editEntityRecord('postType', type, id, {
content: event.target.value,
className: "editor-post-text-editor",
id: `post-content-${instanceId}`,
placeholder: (0,external_wp_i18n_namespaceObject.__)('Start writing with text or HTML')
;// CONCATENATED MODULE: external ["wp","dom"]
const external_wp_dom_namespaceObject = window["wp"]["dom"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-title/constants.js
const DEFAULT_CLASSNAMES = 'wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text';
const REGEXP_NEWLINES = /[\r\n]+/g;
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-title/use-post-title-focus.js
* Custom hook that manages the focus behavior of the post title input field.
* @param {Element} forwardedRef - The forwarded ref for the input field.
* @return {Object} - The ref object.
function usePostTitleFocus(forwardedRef) {
const ref = (0,external_wp_element_namespaceObject.useRef)();
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
isCleanNewPost: _isCleanNewPost
isCleanNewPost: _isCleanNewPost()
(0,external_wp_element_namespaceObject.useImperativeHandle)(forwardedRef, () => ({
(0,external_wp_element_namespaceObject.useEffect)(() => {
} = ref.current.ownerDocument;
const ownerDocument = name === 'editor-canvas' ? parent.document : defaultView.document;
// Only autofocus the title when the post is entirely empty. This should
// only happen for a new post, which means we focus the title on new
// post so the author can start typing right away, without needing to
if (isCleanNewPost && (!activeElement || body === activeElement)) {
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-title/use-post-title.js
* Custom hook for managing the post title in the editor.
* @return {Object} An object containing the current title and a function to update the title.
function usePostTitle() {
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
title: getEditedPostAttribute('title')
function updateTitle(newTitle) {
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-title/index.js
function PostTitle(_, forwardedRef) {
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_blockEditor_namespaceObject.store);
hasFixedToolbar: _hasFixedToolbar
placeholder: titlePlaceholder,
hasFixedToolbar: _hasFixedToolbar
const [isSelected, setIsSelected] = (0,external_wp_element_namespaceObject.useState)(false);
} = usePostTitleFocus(forwardedRef);
const [selection, setSelection] = (0,external_wp_element_namespaceObject.useState)({});
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
function onChange(value) {
onUpdate(value.replace(REGEXP_NEWLINES, ' '));
function onInsertBlockAfter(blocks) {
function onEnterPress() {
insertDefaultBlock(undefined, undefined, 0);
function onKeyDown(event) {
if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER) {
function onPaste(event) {
const clipboardData = event.clipboardData;
// IE11 only supports `Text` as an argument for `getData` and will
// otherwise throw an invalid argument error, so we try the standard
// arguments first, then fallback to `Text` if they fail.
plainText = clipboardData.getData('text/plain');
html = clipboardData.getData('text/html');
html = clipboardData.getData('Text');
// Some browsers like UC Browser paste plain text by default and
// don't support clipboardData at all, so allow default
// Allows us to ask for this information when we get a report.
window.console.log('Received HTML:\n\n', html);
window.console.log('Received plain text:\n\n', plainText);
const content = (0,external_wp_blocks_namespaceObject.pasteHandler)({
if (typeof content !== 'string') {
const [firstBlock] = content;
if (!title && (firstBlock.name === 'core/heading' || firstBlock.name === 'core/paragraph')) {
// Strip HTML to avoid unwanted HTML being added to the title.
// In the majority of cases it is assumed that HTML in the title
const contentNoHTML = (0,external_wp_dom_namespaceObject.__unstableStripHTML)(firstBlock.attributes.content);
onInsertBlockAfter(content.slice(1));
onInsertBlockAfter(content);
...(0,external_wp_richText_namespaceObject.create)({
// Strip HTML to avoid unwanted HTML being added to the title.
// In the majority of cases it is assumed that HTML in the title
const contentNoHTML = (0,external_wp_dom_namespaceObject.__unstableStripHTML)(content);
const newValue = (0,external_wp_richText_namespaceObject.insert)(value, (0,external_wp_richText_namespaceObject.create)({