: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
} = widget_group_metadata;
const widget_group_settings = {
title: (0,external_wp_i18n_namespaceObject.__)('Widget Group'),
description: (0,external_wp_i18n_namespaceObject.__)('Create a classic widget layout with a title that’s styled by your theme for your widget areas.'),
isMatch(attributes, blocks) {
// Avoid transforming existing `widget-group` blocks.
return !blocks.some(block => block.name === 'core/widget-group');
__experimentalConvert(blocks) {
// Put the selected blocks inside the new Widget Group's innerBlocks.
let innerBlocks = [...blocks.map(block => {
return (0,external_wp_blocks_namespaceObject.createBlock)(block.name, block.attributes, block.innerBlocks);
// If the first block is a heading then assume this is intended
// to be the Widget's "title".
const firstHeadingBlock = innerBlocks[0].name === 'core/heading' ? innerBlocks[0] : null;
// Remove the first heading block as we're copying
// it's content into the Widget Group's title attribute.
innerBlocks = innerBlocks.filter(block => block !== firstHeadingBlock);
return (0,external_wp_blocks_namespaceObject.createBlock)('core/widget-group', {
...(firstHeadingBlock && {
title: firstHeadingBlock.attributes.content
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/move-to.js
const moveTo = /*#__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: "M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"
/* harmony default export */ const move_to = (moveTo);
;// CONCATENATED MODULE: ./node_modules/@wordpress/widgets/build-module/components/move-to-widget-area/index.js
function MoveToWidgetArea({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
children: toggleProps => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
label: (0,external_wp_i18n_namespaceObject.__)('Move to widget area'),
toggleProps: toggleProps,
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
label: (0,external_wp_i18n_namespaceObject.__)('Move to'),
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItemsChoice, {
choices: widgetAreas.map(widgetArea => ({
info: widgetArea.description
value: currentWidgetAreaId,
;// CONCATENATED MODULE: ./node_modules/@wordpress/widgets/build-module/components/index.js
;// CONCATENATED MODULE: ./node_modules/@wordpress/widgets/build-module/utils.js
* Get the internal widget id from block.
* @typedef {Object} Attributes
* @property {string} __internalWidgetId The internal widget id.
* @typedef {Object} Block
* @property {Attributes} attributes The attributes of the block.
* @param {Block} block The block.
* @return {string} The internal widget id.
function getWidgetIdFromBlock(block) {
return block.attributes.__internalWidgetId;
* Add internal widget id to block's attributes.
* @param {Block} block The block.
* @param {string} widgetId The widget id.
* @return {Block} The updated block.
function addWidgetIdToBlock(block, widgetId) {
...(block.attributes || {}),
__internalWidgetId: widgetId
;// CONCATENATED MODULE: ./node_modules/@wordpress/widgets/build-module/register-legacy-widget-variations.js
function registerLegacyWidgetVariations(settings) {
const unsubscribe = (0,external_wp_data_namespaceObject.subscribe)(() => {
var _settings$widgetTypes;
const hiddenIds = (_settings$widgetTypes = settings?.widgetTypesToHideFromLegacyWidgetBlock) !== null && _settings$widgetTypes !== void 0 ? _settings$widgetTypes : [];
const widgetTypes = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getWidgetTypes({
})?.filter(widgetType => !hiddenIds.includes(widgetType.id));
(0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).addBlockVariations('core/legacy-widget', widgetTypes.map(widgetType => ({
description: widgetType.description,
attributes: widgetType.is_multi ? {
;// CONCATENATED MODULE: ./node_modules/@wordpress/widgets/build-module/index.js
* Registers the Legacy Widget block.
* Note that for the block to be useful, any scripts required by a widget must
* be loaded into the page.
* @param {Object} supports Block support settings.
* @see https://developer.wordpress.org/block-editor/how-to-guides/widgets/legacy-widget-block/
function registerLegacyWidgetBlock(supports = {}) {
} = legacy_widget_namespaceObject;
(0,external_wp_blocks_namespaceObject.registerBlockType)({
* Registers the Widget Group block.
* @param {Object} supports Block support settings.
function registerWidgetGroupBlock(supports = {}) {
} = widget_group_namespaceObject;
(0,external_wp_blocks_namespaceObject.registerBlockType)({
(window.wp = window.wp || {}).widgets = __webpack_exports__;