Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/blocks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Breaking Changes

- The deprecated `registerBlockTypeFromMetadata` function was removed. Please use `registerBlockType` that covers the same functionality ([#32030](https://github.com/WordPress/gutenberg/pull/32030)).

## 9.1.0 (2021-05-20)

### New API
Expand Down
15 changes: 0 additions & 15 deletions packages/blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,21 +713,6 @@ _Returns_

- `?WPBlock`: The block, if it has been successfully registered; otherwise `undefined`.

<a name="registerBlockTypeFromMetadata" href="#registerBlockTypeFromMetadata">#</a> **registerBlockTypeFromMetadata**

> **Deprecated** Use `registerBlockType` instead.

Registers a new block provided from metadata stored in `block.json` file.

_Parameters_

- _metadata_ `Object`: Block metadata loaded from `block.json`.
- _additionalSettings_ `Object`: Additional block settings.

_Returns_

- `?WPBlock`: The block, if it has been successfully registered; otherwise `undefined`.

<a name="registerBlockVariation" href="#registerBlockVariation">#</a> **registerBlockVariation**

Registers a new block variation for the given block type.
Expand Down
1 change: 0 additions & 1 deletion packages/blocks/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export { getCategories, setCategories, updateCategory } from './categories';
// children of another block.
export {
registerBlockType,
registerBlockTypeFromMetadata,
registerBlockCollection,
unregisterBlockType,
setFreeformContentHandlerName,
Expand Down
22 changes: 0 additions & 22 deletions packages/blocks/src/api/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
/**
* WordPress dependencies
*/
import deprecated from '@wordpress/deprecated';
import { applyFilters } from '@wordpress/hooks';
import { select, dispatch } from '@wordpress/data';
import { _x } from '@wordpress/i18n';
Expand Down Expand Up @@ -424,27 +423,6 @@ function translateBlockSettingUsingI18nSchema(
return settingValue;
}

/**
* Registers a new block provided from metadata stored in `block.json` file.
*
* @deprecated Use `registerBlockType` instead.
*
* @param {Object} metadata Block metadata loaded from `block.json`.
* @param {Object} additionalSettings Additional block settings.
*
* @return {?WPBlock} The block, if it has been successfully registered;
* otherwise `undefined`.
*/
export function registerBlockTypeFromMetadata( metadata, additionalSettings ) {
deprecated( 'wp.blocks.registerBlockTypeFromMetadata', {
since: '10.7',
plugin: 'Gutenberg',
alternative: 'wp.blocks.registerBlockType',
version: '11.0',
} );
return registerBlockType( metadata, additionalSettings );
}

/**
* Registers a new block collection to group blocks in the same namespace in the inserter.
*
Expand Down