: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
value: ['color', 'gradient'],
support: ['color', 'gradients'],
value: ['color', 'background'],
support: ['color', 'background'],
value: ['background', 'backgroundImage'],
support: ['background', 'backgroundImage'],
value: ['background', 'backgroundRepeat'],
support: ['background', 'backgroundRepeat'],
value: ['background', 'backgroundSize'],
support: ['background', 'backgroundSize'],
value: ['background', 'backgroundPosition'],
support: ['background', 'backgroundPosition'],
value: ['border', 'color'],
support: ['__experimentalBorder', 'color'],
value: ['border', 'radius'],
support: ['__experimentalBorder', 'radius'],
borderTopLeftRadius: 'topLeft',
borderTopRightRadius: 'topRight',
borderBottomLeftRadius: 'bottomLeft',
borderBottomRightRadius: 'bottomRight'
value: ['border', 'style'],
support: ['__experimentalBorder', 'style'],
value: ['border', 'width'],
support: ['__experimentalBorder', 'width'],
value: ['border', 'top', 'color'],
support: ['__experimentalBorder', 'color'],
value: ['border', 'top', 'style'],
support: ['__experimentalBorder', 'style'],
value: ['border', 'top', 'width'],
support: ['__experimentalBorder', 'width'],
value: ['border', 'right', 'color'],
support: ['__experimentalBorder', 'color'],
value: ['border', 'right', 'style'],
support: ['__experimentalBorder', 'style'],
value: ['border', 'right', 'width'],
support: ['__experimentalBorder', 'width'],
value: ['border', 'bottom', 'color'],
support: ['__experimentalBorder', 'color'],
value: ['border', 'bottom', 'style'],
support: ['__experimentalBorder', 'style'],
value: ['border', 'bottom', 'width'],
support: ['__experimentalBorder', 'width'],
value: ['border', 'left', 'color'],
support: ['__experimentalBorder', 'color'],
value: ['border', 'left', 'style'],
support: ['__experimentalBorder', 'style'],
value: ['border', 'left', 'width'],
support: ['__experimentalBorder', 'width'],
value: ['color', 'text'],
support: ['color', 'text'],
value: ['typography', 'textColumns'],
support: ['typography', 'textColumns'],
value: ['filter', 'duotone'],
support: ['filter', 'duotone']
value: ['elements', 'link', 'color', 'text'],
support: ['color', 'link']
value: ['elements', 'caption', 'color', 'text'],
support: ['color', 'caption']
value: ['elements', 'button', 'color', 'text'],
support: ['color', 'button']
value: ['elements', 'button', 'color', 'background'],
support: ['color', 'button']
value: ['elements', 'heading', 'color', 'text'],
support: ['color', 'heading']
headingBackgroundColor: {
value: ['elements', 'heading', 'color', 'background'],
support: ['color', 'heading']
value: ['typography', 'fontFamily'],
support: ['typography', '__experimentalFontFamily'],
value: ['typography', 'fontSize'],
support: ['typography', 'fontSize'],
value: ['typography', 'fontStyle'],
support: ['typography', '__experimentalFontStyle'],
value: ['typography', 'fontWeight'],
support: ['typography', '__experimentalFontWeight'],
value: ['typography', 'lineHeight'],
support: ['typography', 'lineHeight'],
value: ['spacing', 'margin'],
support: ['spacing', 'margin'],
value: ['dimensions', 'minHeight'],
support: ['dimensions', 'minHeight'],
value: ['spacing', 'padding'],
support: ['spacing', 'padding'],
value: ['typography', 'textAlign'],
support: ['typography', 'textAlign'],
value: ['typography', 'textDecoration'],
support: ['typography', '__experimentalTextDecoration'],
value: ['typography', 'textTransform'],
support: ['typography', '__experimentalTextTransform'],
value: ['typography', 'letterSpacing'],
support: ['typography', '__experimentalLetterSpacing'],
value: ['typography', 'writingMode'],
support: ['typography', '__experimentalWritingMode'],
'--wp--style--root--padding': {
value: ['spacing', 'padding'],
support: ['spacing', 'padding'],
'--wp--style--root--padding-top': 'top',
'--wp--style--root--padding-right': 'right',
'--wp--style--root--padding-bottom': 'bottom',
'--wp--style--root--padding-left': 'left'
const __EXPERIMENTAL_ELEMENTS = {
link: 'a:where(:not(.wp-element-button))',
heading: 'h1, h2, h3, h4, h5, h6',
button: '.wp-element-button, .wp-block-button__link',
caption: '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption',
// These paths may have three origins, custom, theme, and default,
// and are expected to override other origins with custom, theme,
const __EXPERIMENTAL_PATHS_WITH_OVERRIDE = {
'dimensions.aspectRatios': true,
'typography.fontSizes': true,
'spacing.spacingSizes': true
;// CONCATENATED MODULE: external ["wp","privateApis"]
const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/lock-unlock.js
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/blocks');
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/registration.js
/* eslint no-console: [ 'error', { allow: [ 'error', 'warn' ] } ] */
const i18nBlockSchema = {
description: "block description",
keywords: ["block keyword"],
label: "block style label"
title: "block variation title",
description: "block variation description",
keywords: ["block variation keyword"]
* An icon type definition. One of a Dashicon slug, an element,
* @typedef {(string|Element|Component)} WPIcon
* @see https://developer.wordpress.org/resource/dashicons/
* Render behavior of a block type icon; one of a Dashicon slug, an element,
* @typedef {WPIcon} WPBlockTypeIconRender
* An object describing a normalized block type icon.
* @typedef {Object} WPBlockTypeIconDescriptor
* @property {WPBlockTypeIconRender} src Render behavior of the icon,
* one of a Dashicon slug, an
* element, or a component.
* @property {string} background Optimal background hex string
* color when displaying icon.
* @property {string} foreground Optimal foreground hex string
* color when displaying icon.
* @property {string} shadowColor Optimal shadow hex string
* color when displaying icon.
* Value to use to render the icon for a block type in an editor interface,
* either a Dashicon slug, an element, a component, or an object describing
* @typedef {(WPBlockTypeIconDescriptor|WPBlockTypeIconRender)} WPBlockTypeIcon
* Named block variation scopes.
* @typedef {'block'|'inserter'|'transform'} WPBlockVariationScope
* An object describing a variation defined for the block type.
* @typedef {Object} WPBlockVariation
* @property {string} name The unique and machine-readable name.
* @property {string} title A human-readable variation title.
* @property {string} [description] A detailed variation description.
* @property {string} [category] Block type category classification,
* used in search interfaces to arrange
* block types by category.
* @property {WPIcon} [icon] An icon helping to visualize the variation.
* @property {boolean} [isDefault] Indicates whether the current variation is
* the default one. Defaults to `false`.
* @property {Object} [attributes] Values which override block attributes.
* @property {Array[]} [innerBlocks] Initial configuration of nested blocks.
* @property {Object} [example] Example provides structured data for
* the block preview. You can set to
* `undefined` to disable the preview shown
* @property {WPBlockVariationScope[]} [scope] The list of scopes where the variation
* is applicable. When not provided, it
* assumes all available scopes.
* @property {string[]} [keywords] An array of terms (which can be translated)
* that help users discover the variation
* @property {Function|string[]} [isActive] This can be a function or an array of block attributes.
* Function that accepts a block's attributes and the
* variation's attributes and determines if a variation is active.
* This function doesn't try to find a match dynamically based
* on all block's attributes, as in many cases some attributes are irrelevant.
* An example would be for `embed` block where we only care
* about `providerNameSlug` attribute's value.
* We can also use a `string[]` to tell which attributes
* should be compared as a shorthand. Each attributes will
* be matched and the variation will be active if all of them are matching.
* Defined behavior of a block type.
* @typedef {Object} WPBlockType
* @property {string} name Block type's namespaced name.
* @property {string} title Human-readable block type label.
* @property {string} [description] A detailed block type description.
* @property {string} [category] Block type category classification,
* used in search interfaces to arrange
* block types by category.
* @property {WPBlockTypeIcon} [icon] Block type icon.
* @property {string[]} [keywords] Additional keywords to produce block
* type as result in search interfaces.
* @property {Object} [attributes] Block type attributes.
* @property {Component} [save] Optional component describing
* serialized markup structure of a
* @property {Component} edit Component rendering an element to
* manipulate the attributes of a block
* in the context of an editor.
* @property {WPBlockVariation[]} [variations] The list of block variations.
* @property {Object} [example] Example provides structured data for
* the block preview. When not defined
* then no preview is shown.
function isObject(object) {
return object !== null && typeof object === 'object';
* Sets the server side block definition of blocks.
* @param {Object} definitions Server-side block definitions
// eslint-disable-next-line camelcase
function unstable__bootstrapServerSideBlockDefinitions(definitions) {
} = unlock((0,external_wp_data_namespaceObject.dispatch)(store));
for (const [name, blockType] of Object.entries(definitions)) {
addBootstrappedBlockType(name, blockType);
* Gets block settings from metadata loaded from `block.json` file.
* @param {Object} metadata Block metadata loaded from `block.json`.
* @param {string} metadata.textdomain Textdomain to use with translations.
* @return {Object} Block settings.
function getBlockSettingsFromMetadata({
const allowedFields = ['apiVersion', 'title', 'category', 'parent', 'ancestor', 'icon', 'description', 'keywords', 'attributes', 'providesContext', 'usesContext', 'selectors', 'supports', 'styles', 'example', 'variations', 'blockHooks', 'allowedBlocks'];
const settings = Object.fromEntries(Object.entries(metadata).filter(([key]) => allowedFields.includes(key)));
Object.keys(i18nBlockSchema).forEach(key => {
settings[key] = translateBlockSettingUsingI18nSchema(i18nBlockSchema[key], settings[key], textdomain);
* Registers a new block provided a unique name and an object defining its
* behavior. Once registered, the block is made available as an option to any
* editor interface where blocks are implemented.
* For more in-depth information on registering a custom block see the
* [Create a block tutorial](https://developer.wordpress.org/block-editor/getting-started/create-block/).
* @param {string|Object} blockNameOrMetadata Block type name or its metadata.
* @param {Object} settings Block settings.
* import { __ } from '@wordpress/i18n';
* import { registerBlockType } from '@wordpress/blocks'
* registerBlockType( 'namespace/block-name', {
* title: __( 'My First Block' ),
* edit: () => <div>{ __( 'Hello from the editor!' ) }</div>,
* save: () => <div>Hello from the saved content!</div>,
* @return {WPBlockType | undefined} The block, if it has been successfully registered;
function registerBlockType(blockNameOrMetadata, settings) {
const name = isObject(blockNameOrMetadata) ? blockNameOrMetadata.name : blockNameOrMetadata;
if (typeof name !== 'string') {
console.error('Block names must be strings.');
if (!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(name)) {
console.error('Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block');