: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
onUpdate((0,external_wp_richText_namespaceObject.toHTMLString)({
const decodedPlaceholder = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(placeholder) || (0,external_wp_i18n_namespaceObject.__)('Add title');
} = (0,external_wp_richText_namespaceObject.__unstableUseRichText)({
placeholder: decodedPlaceholder,
selectionStart: selection.start,
selectionEnd: selection.end,
onSelectionChange(newStart, newEnd) {
if (start === newStart && end === newEnd) {
__unstableDisableFormats: false
// The wp-block className is important for editor styles.
// This same block is used in both the visual and the code editor.
const className = dist_clsx(DEFAULT_CLASSNAMES, {
'is-selected': isSelected,
'has-fixed-toolbar': hasFixedToolbar
/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_type_support_check, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([richTextRef, focusRef]),
"aria-label": decodedPlaceholder,
"aria-multiline": "true",
/* eslint-enable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
* Renders the `PostTitle` component.
* @param {Object} _ Unused parameter.
* @param {Element} forwardedRef Forwarded ref for the component.
* @return {Component} The rendered PostTitle component.
/* harmony default export */ const post_title = ((0,external_wp_element_namespaceObject.forwardRef)(PostTitle));
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-title/post-title-raw.js
* Renders a raw post title input field.
* @param {Object} _ Unused parameter.
* @param {Element} forwardedRef Reference to the component's DOM node.
* @return {Component} The rendered component.
function PostTitleRaw(_, 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);
function onChange(value) {
onUpdate(value.replace(REGEXP_NEWLINES, ' '));
// The wp-block className is important for editor styles.
// This same block is used in both the visual and the code editor.
const className = dist_clsx(DEFAULT_CLASSNAMES, {
'is-selected': isSelected,
'has-fixed-toolbar': hasFixedToolbar,
const decodedPlaceholder = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(placeholder) || (0,external_wp_i18n_namespaceObject.__)('Add title');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextareaControl, {
placeholder: decodedPlaceholder,
hideLabelFromVision: true,
__nextHasNoMarginBottom: true
/* harmony default export */ const post_title_raw = ((0,external_wp_element_namespaceObject.forwardRef)(PostTitleRaw));
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-trash/index.js
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const store = select(store_store);
isNew: store.isEditedPostNew(),
isDeleting: store.isDeletingPost(),
postId: store.getCurrentPostId()
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
const [showConfirmDialog, setShowConfirmDialog] = (0,external_wp_element_namespaceObject.useState)(false);
const handleConfirm = () => {
setShowConfirmDialog(false);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
__next40pxDefaultSize: true,
className: "editor-post-trash",
"aria-disabled": isDeleting,
onClick: isDeleting ? undefined : () => setShowConfirmDialog(true),
children: (0,external_wp_i18n_namespaceObject.__)('Move to trash')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
isOpen: showConfirmDialog,
onConfirm: handleConfirm,
onCancel: () => setShowConfirmDialog(false),
confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Move to trash'),
children: (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to move this post to the trash?')
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-trash/check.js
function PostTrashCheck({
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_coreData_namespaceObject.store);
const postType = getPostType(getCurrentPostType());
const postId = getCurrentPostId();
const isNew = isEditedPostNew();
const resource = postType?.rest_base || ''; // eslint-disable-line camelcase
const canUserDelete = postId && resource ? canUser('delete', resource, postId) : false;
canTrashPost: (!isNew || postId) && canUserDelete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/copy-small.js
const copySmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"
/* harmony default export */ const copy_small = (copySmall);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-url/index.js
* Renders the `PostURL` component.
* @param {Function} onClose Callback function to be executed when the popover is closed.
* @return {Component} The rendered PostURL component.
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _post$_links$wpActio;
const post = select(store_store).getCurrentPost();
const postTypeSlug = select(store_store).getCurrentPostType();
const postType = select(external_wp_coreData_namespaceObject.store).getPostType(postTypeSlug);
const permalinkParts = select(store_store).getPermalinkParts();
const hasPublishAction = (_post$_links$wpActio = post?._links?.['wp:action-publish']) !== null && _post$_links$wpActio !== void 0 ? _post$_links$wpActio : false;
isEditable: select(store_store).isPermalinkEditable() && hasPublishAction,
postSlug: (0,external_wp_url_namespaceObject.safeDecodeURIComponent)(select(store_store).getEditedPostSlug()),
viewPostLabel: postType?.labels.view_item,
permalinkPrefix: permalinkParts?.prefix,
permalinkSuffix: permalinkParts?.suffix,
permalink: (0,external_wp_url_namespaceObject.safeDecodeURIComponent)(select(store_store).getPermalink())
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
const [forceEmptyField, setForceEmptyField] = (0,external_wp_element_namespaceObject.useState)(false);
const copyButtonRef = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(permalink, () => {
createNotice('info', (0,external_wp_i18n_namespaceObject.__)('Copied URL to clipboard.'), {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "editor-post-url",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalInspectorPopoverHeader, {
title: (0,external_wp_i18n_namespaceObject.__)('Link'),
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
children: [isEditable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
children: [(0,external_wp_i18n_namespaceObject.__)('Customize the last part of the URL. '), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'),
children: (0,external_wp_i18n_namespaceObject.__)('Learn more.')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
children: [isEditable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalInputControl, {
__next40pxDefaultSize: true,
prefix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalInputControlPrefixWrapper, {
suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
label: (0,external_wp_i18n_namespaceObject.__)('Copy')
label: (0,external_wp_i18n_namespaceObject.__)('Link'),
hideLabelFromVision: true,
value: forceEmptyField ? '' : postSlug,
className: "editor-post-url__input",
// When we delete the field the permalink gets
// reverted to the original value.
// The forceEmptyField logic allows the user to have
// the field temporarily empty while typing.
setForceEmptyField(true);
setForceEmptyField(false);
slug: (0,external_wp_url_namespaceObject.cleanForSlug)(event.target.value)
setForceEmptyField(false);
help: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ExternalLink, {
className: "editor-post-url__link",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "editor-post-url__link-prefix",
children: permalinkPrefix
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "editor-post-url__link-slug",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "editor-post-url__link-suffix",
children: permalinkSuffix
}), !isEditable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
className: "editor-post-url__link",
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-url/check.js
* Check if the post URL is valid and visible.
* @param {Object} props The component props.
* @param {Element} props.children The child components.
* @return {Component|null} The child components if the post URL is valid and visible, otherwise null.
const isVisible = (0,external_wp_data_namespaceObject.useSelect)(select => {
const postTypeSlug = select(store_store).getCurrentPostType();
const postType = select(external_wp_coreData_namespaceObject.store).getPostType(postTypeSlug);
if (!postType?.viewable) {
const post = select(store_store).getCurrentPost();
const permalinkParts = select(store_store).getPermalinkParts();
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-url/label.js