Skip to content

Commit

Permalink
Deprecate old inserter selectors in 3.2, not 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed May 24, 2018
1 parent d42964f commit 4eb77c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/reference/deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Gutenberg's deprecation policy is intended to support backwards-compatibility fo

- `wp.data.withRehydratation` has been renamed to `wp.data.withRehydration`.
- The `wp.editor.ImagePlaceholder` component is removed. Please use `wp.editor.MediaPlaceholder` instead.
- `getInserterItems`: the `allowedBlockTypes` argument was removed and the `parentUID` argument was added.
- `getFrecentInserterItems` selector removed. Please use `getInserterItems` instead.
- `getSupportedBlocks` selector removed. Please use `canInsertBlockType` instead.

## 3.1.0

Expand All @@ -12,9 +15,6 @@ Gutenberg's deprecation policy is intended to support backwards-compatibility fo
- All DOM utils in `wp.utils.*` are removed. Please use `wp.dom.*` instead.
- `isPrivate: true` has been removed from the Block API. Please use `supports.inserter: false` instead.
- `wp.utils.isExtraSmall` function removed. Please use `wp.viewport.*` instead.
- `getInserterItems`: The `allowedBlockTypes` argument was removed and the `parentUID` argument was added.
- `getFrecentInserterItems` selector removed. Please use `getInserterItems` instead.
- `getSupportedBlocks` selector removed. Please use `canInsertBlockType` instead.

## 3.0.0

Expand Down
6 changes: 3 additions & 3 deletions editor/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ export const getInserterItems = createSelector(
*/
if ( isBoolean( parentUID ) || isArray( parentUID ) ) {
deprecated( 'allowedBlockTypes', {
version: '3.1',
version: '3.2',
plugin: 'Gutenberg',
} );
parentUID = null;
Expand Down Expand Up @@ -1486,7 +1486,7 @@ export const getInserterItems = createSelector(
*/
export function getFrecentInserterItems( state, allowedBlockTypes, maximum = MAX_RECENT_BLOCKS ) {
deprecated( 'getFrecentInserterItems', {
version: '3.1',
version: '3.2',
alternative: 'getInserterItems',
plugin: 'Gutenberg',
} );
Expand Down Expand Up @@ -1717,7 +1717,7 @@ export function getBlockListSettings( state, uid ) {
// eslint-disable-next-line no-unused-vars
export function getSupportedBlocks( state, uid, globallyEnabledBlockTypes ) {
deprecated( 'getSupportedBlocks', {
version: '3.1',
version: '3.2',
alternative: 'canInsertBlockType',
plugin: 'Gutenberg',
} );
Expand Down

0 comments on commit 4eb77c8

Please sign in to comment.