: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
getBlockParentsByBlockName
} = select(external_wp_blockEditor_namespaceObject.store);
const [patternClientId] = getBlockParentsByBlockName(props.clientId, 'core/block', true);
const overrides = getBlockAttributes(patternClientId)[CONTENT];
return overrides.hasOwnProperty(name);
}, [props.clientId, name]);
getBlockParentsByBlockName
} = registry.select(external_wp_blockEditor_namespaceObject.store);
const [patternClientId] = getBlockParentsByBlockName(props.clientId, 'core/block', true);
const overrides = getBlockAttributes(patternClientId)[CONTENT];
if (!overrides.hasOwnProperty(name)) {
__unstableMarkLastChangeAsPersistent
} = registry.dispatch(external_wp_blockEditor_namespaceObject.store);
__unstableMarkLastChangeAsPersistent();
delete newOverrides[name];
if (!Object.keys(newOverrides).length) {
newOverrides = undefined;
updateBlockAttributes(patternClientId, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableBlockToolbarLastItem, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
__experimentalIsFocusable: true,
children: (0,external_wp_i18n_namespaceObject.__)('Reset')
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/copy.js
const copy = /*#__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 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"
/* harmony default export */ const library_copy = (copy);
;// CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/pattern-overrides-block-controls.js
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
function PatternOverridesToolbarIndicator({
const isSingleBlockSelected = clientIds.length === 1;
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_blockEditor_namespaceObject.store);
} = select(external_wp_blocks_namespaceObject.store);
const blockTypeNames = getBlockNamesByClientId(clientIds);
const _firstBlockTypeName = blockTypeNames[0];
const firstBlockType = getBlockType(_firstBlockTypeName);
if (isSingleBlockSelected) {
const match = getActiveBlockVariation(_firstBlockTypeName, getBlockAttributes(clientIds[0]));
// Take into account active block variations.
_icon = match?.icon || firstBlockType.icon;
const isSelectionOfSameType = new Set(blockTypeNames).size === 1;
// When selection consists of blocks of multiple types, display an
// appropriate icon to communicate the non-uniformity.
_icon = isSelectionOfSameType ? firstBlockType.icon : library_copy;
firstBlockName: getBlockAttributes(clientIds[0]).metadata.name
}, [clientIds, isSingleBlockSelected]);
const firstBlockTitle = useBlockDisplayTitle({
const blockDescription = isSingleBlockSelected ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %1s: The block type's name; %2s: The block's user-provided name (the same as the override name). */
(0,external_wp_i18n_namespaceObject.__)('This %1$s is editable using the "%2$s" override.'), firstBlockTitle.toLowerCase(), firstBlockName) : (0,external_wp_i18n_namespaceObject.__)('These blocks are editable using overrides.');
const descriptionId = (0,external_wp_element_namespaceObject.useId)();
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
children: toggleProps => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
className: "patterns-pattern-overrides-toolbar-indicator",
placement: 'bottom-start',
className: 'patterns-pattern-overrides-toolbar-indicator__popover'
icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
className: "patterns-pattern-overrides-toolbar-indicator-icon",
describedBy: blockDescription,
'aria-describedby': descriptionId
children: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
children: blockDescription
function PatternOverridesBlockControls() {
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
getSelectedBlockClientIds,
getBlockParentsByBlockName
} = select(external_wp_blockEditor_namespaceObject.store);
const selectedClientIds = getSelectedBlockClientIds();
const _hasPatternOverrides = selectedClientIds.every(clientId => {
var _getBlockAttributes$m;
return Object.values((_getBlockAttributes$m = getBlockAttributes(clientId)?.metadata?.bindings) !== null && _getBlockAttributes$m !== void 0 ? _getBlockAttributes$m : {}).some(binding => binding?.source === PATTERN_OVERRIDES_BINDING_SOURCE);
const _hasParentPattern = selectedClientIds.every(clientId => getBlockParentsByBlockName(clientId, 'core/block', true).length > 0);
clientIds: selectedClientIds,
hasPatternOverrides: _hasPatternOverrides,
hasParentPattern: _hasParentPattern
return hasPatternOverrides && hasParentPattern ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternOverridesToolbarIndicator, {
;// CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/private-apis.js
OverridesPanel: OverridesPanel,
CreatePatternModal: CreatePatternModal,
CreatePatternModalContents: CreatePatternModalContents,
DuplicatePatternModal: DuplicatePatternModal,
isOverridableBlock: isOverridableBlock,
hasOverridableBlocks: hasOverridableBlocks,
useDuplicatePatternProps: useDuplicatePatternProps,
RenamePatternModal: RenamePatternModal,
PatternsMenuItems: PatternsMenuItems,
RenamePatternCategoryModal: RenamePatternCategoryModal,
PatternOverridesControls: pattern_overrides_controls,
ResetOverridesControl: ResetOverridesControl,
PatternOverridesBlockControls: PatternOverridesBlockControls,
useAddPatternCategory: useAddPatternCategory,
PATTERN_TYPES: PATTERN_TYPES,
PATTERN_DEFAULT_CATEGORY: PATTERN_DEFAULT_CATEGORY,
PATTERN_USER_CATEGORY: PATTERN_USER_CATEGORY,
EXCLUDED_PATTERN_SOURCES: EXCLUDED_PATTERN_SOURCES,
PATTERN_SYNC_TYPES: PATTERN_SYNC_TYPES,
PARTIAL_SYNCING_SUPPORTED_BLOCKS: PARTIAL_SYNCING_SUPPORTED_BLOCKS
;// CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/index.js
(window.wp = window.wp || {}).patterns = __webpack_exports__;