From b7462bc433560225f94ef2d608cb5f64fdf3ef2f Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Mon, 22 Mar 2021 08:32:02 +0400 Subject: [PATCH 1/3] Add 'since' versions to the deprecated features --- packages/block-editor/src/components/block-card/index.js | 1 + .../src/components/block-list/block-wrapper.js | 1 + .../src/components/media-placeholder/index.js | 1 + .../src/components/navigable-toolbar/index.js | 1 + .../src/components/preserve-scroll-in-reorder/index.js | 1 + packages/block-editor/src/components/rich-text/index.js | 2 ++ packages/block-editor/src/store/actions.js | 1 + packages/blocks/src/api/raw-handling/index.js | 1 + packages/components/src/button/deprecated.js | 1 + packages/components/src/button/index.js | 1 + packages/components/src/clipboard-button/index.js | 1 + packages/components/src/dropdown-menu/index.js | 2 ++ packages/components/src/guide/index.js | 1 + packages/components/src/guide/page.js | 1 + .../src/higher-order/with-focus-return/index.js | 1 + .../components/src/isolated-event-container/index.js | 4 +++- packages/components/src/modal/index.js | 1 + packages/components/src/popover/index.js | 1 + packages/components/src/toolbar/index.js | 1 + .../compose/src/higher-order/with-global-events/index.js | 1 + packages/compose/src/hooks/use-copy-on-click/index.js | 1 + packages/core-data/src/resolvers.js | 1 + packages/core-data/src/selectors.js | 1 + packages/data-controls/src/index.js | 3 +++ packages/data/src/plugins/controls/index.js | 1 + packages/editor/src/components/deprecated.js | 2 ++ .../global-keyboard-shortcuts/visual-editor-shortcuts.js | 1 + packages/editor/src/store/actions.js | 3 +++ packages/editor/src/store/selectors.js | 9 +++++++++ packages/interface/src/components/action-item/index.js | 1 + packages/nux/src/index.js | 1 + packages/server-side-render/src/index.js | 1 + 32 files changed, 49 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-card/index.js b/packages/block-editor/src/components/block-card/index.js index 60f8616b5f49dd..bead93e1bbcb98 100644 --- a/packages/block-editor/src/components/block-card/index.js +++ b/packages/block-editor/src/components/block-card/index.js @@ -11,6 +11,7 @@ import BlockIcon from '../block-icon'; function BlockCard( { title, icon, description, blockType } ) { if ( blockType ) { deprecated( '`blockType` property in `BlockCard component`', { + since: '9.7', alternative: '`title, icon and description` properties', } ); ( { title, icon, description } = blockType ); diff --git a/packages/block-editor/src/components/block-list/block-wrapper.js b/packages/block-editor/src/components/block-list/block-wrapper.js index 469b77c3e34a52..4d77c039236631 100644 --- a/packages/block-editor/src/components/block-list/block-wrapper.js +++ b/packages/block-editor/src/components/block-list/block-wrapper.js @@ -13,6 +13,7 @@ import { useBlockProps } from './use-block-props'; const BlockComponent = forwardRef( ( { children, tagName: TagName = 'div', ...props }, ref ) => { deprecated( 'wp.blockEditor.__experimentalBlock', { + since: '9.1', alternative: 'wp.blockEditor.useBlockProps', } ); const blockProps = useBlockProps( { ...props, ref } ); diff --git a/packages/block-editor/src/components/media-placeholder/index.js b/packages/block-editor/src/components/media-placeholder/index.js index c602c4ca8fea72..28a13f74d61db1 100644 --- a/packages/block-editor/src/components/media-placeholder/index.js +++ b/packages/block-editor/src/components/media-placeholder/index.js @@ -391,6 +391,7 @@ export function MediaPlaceholder( { if ( dropZoneUIOnly || disableMediaButtons ) { if ( dropZoneUIOnly ) { deprecated( 'wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop', { + since: '6.6', alternative: 'disableMediaButtons', } ); } diff --git a/packages/block-editor/src/components/navigable-toolbar/index.js b/packages/block-editor/src/components/navigable-toolbar/index.js index aa516640ae7365..3baca0419f0d12 100644 --- a/packages/block-editor/src/components/navigable-toolbar/index.js +++ b/packages/block-editor/src/components/navigable-toolbar/index.js @@ -61,6 +61,7 @@ function useIsAccessibleToolbar( ref ) { const onlyToolbarItem = hasOnlyToolbarItem( tabbables ); if ( ! onlyToolbarItem ) { deprecated( 'Using custom components as toolbar controls', { + since: '8.8', alternative: 'ToolbarItem or ToolbarButton components', link: 'https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols', diff --git a/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js b/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js index f9e9650d93f0de..9d3ce5e2181fc5 100644 --- a/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js +++ b/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js @@ -5,6 +5,7 @@ import deprecated from '@wordpress/deprecated'; export default function PreserveScrollInReorder() { deprecated( 'PreserveScrollInReorder component', { + since: '6.6', hint: 'This behavior is now built-in the block list', } ); return null; diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 11da84a07c7fb8..96fe50d8f8dcaf 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -101,6 +101,7 @@ function getAllowedFormats( { } deprecated( 'wp.blockEditor.RichText formattingControls prop', { + since: '6.2', alternative: 'allowedFormats', } ); @@ -716,6 +717,7 @@ function RichTextWrapper( } deprecated( 'wp.blockEditor.RichText wrapperClassName prop', { + since: '6.7', alternative: 'className prop or create your own wrapper div', } ); diff --git a/packages/block-editor/src/store/actions.js b/packages/block-editor/src/store/actions.js index 7fd0555881e346..75a3706d31c80b 100644 --- a/packages/block-editor/src/store/actions.js +++ b/packages/block-editor/src/store/actions.js @@ -574,6 +574,7 @@ export function* insertBlocks( meta = initialPosition; initialPosition = 0; deprecated( "meta argument in wp.data.dispatch('core/block-editor')", { + since: '10.1', hint: 'The meta argument is now the 6th argument of the function', } ); } diff --git a/packages/blocks/src/api/raw-handling/index.js b/packages/blocks/src/api/raw-handling/index.js index 3d062892e7fa7f..3e0b663cb11251 100644 --- a/packages/blocks/src/api/raw-handling/index.js +++ b/packages/blocks/src/api/raw-handling/index.js @@ -26,6 +26,7 @@ export { pasteHandler } from './paste-handler'; export function deprecatedGetPhrasingContentSchema( context ) { deprecated( 'wp.blocks.getPhrasingContentSchema', { + since: '8.9', alternative: 'wp.dom.getPhrasingContentSchema', } ); return getPhrasingContentSchema( context ); diff --git a/packages/components/src/button/deprecated.js b/packages/components/src/button/deprecated.js index 6c676d00215811..89e30c98996d2e 100644 --- a/packages/components/src/button/deprecated.js +++ b/packages/components/src/button/deprecated.js @@ -11,6 +11,7 @@ import Button from '../button'; function IconButton( { labelPosition, size, tooltip, label, ...props }, ref ) { deprecated( 'wp.components.IconButton', { + since: '7.2', alternative: 'wp.components.Button', } ); diff --git a/packages/components/src/button/index.js b/packages/components/src/button/index.js index 3af63e473d21fc..344806f6a13f24 100644 --- a/packages/components/src/button/index.js +++ b/packages/components/src/button/index.js @@ -51,6 +51,7 @@ export function Button( props, ref ) { if ( isDefault ) { deprecated( 'Button isDefault prop', { + since: '7.2', alternative: 'isSecondary', } ); } diff --git a/packages/components/src/clipboard-button/index.js b/packages/components/src/clipboard-button/index.js index c0d969935451dd..a2a454ddc682fc 100644 --- a/packages/components/src/clipboard-button/index.js +++ b/packages/components/src/clipboard-button/index.js @@ -26,6 +26,7 @@ export default function ClipboardButton( { ...buttonProps } ) { deprecated( 'wp.components.ClipboardButton', { + since: '10.3', alternative: 'wp.compose.useCopyToClipboard', } ); diff --git a/packages/components/src/dropdown-menu/index.js b/packages/components/src/dropdown-menu/index.js index 64778f9da3914c..291b5a901a75f2 100644 --- a/packages/components/src/dropdown-menu/index.js +++ b/packages/components/src/dropdown-menu/index.js @@ -54,6 +54,7 @@ function DropdownMenu( { } ) { if ( menuLabel ) { deprecated( '`menuLabel` prop in `DropdownComponent`', { + since: '6.3', alternative: '`menuProps` object and its `aria-label` property', plugin: 'Gutenberg', } ); @@ -61,6 +62,7 @@ function DropdownMenu( { if ( position ) { deprecated( '`position` prop in `DropdownComponent`', { + since: '6.3', alternative: '`popoverProps` object and its `position` property', plugin: 'Gutenberg', } ); diff --git a/packages/components/src/guide/index.js b/packages/components/src/guide/index.js index f16cd25456494d..415f7c270a188d 100644 --- a/packages/components/src/guide/index.js +++ b/packages/components/src/guide/index.js @@ -32,6 +32,7 @@ export default function Guide( { useEffect( () => { if ( Children.count( children ) ) { deprecated( 'Passing children to ', { + since: '8.2', alternative: 'the `pages` prop', } ); } diff --git a/packages/components/src/guide/page.js b/packages/components/src/guide/page.js index 18014f4548f2ed..61444977e95be6 100644 --- a/packages/components/src/guide/page.js +++ b/packages/components/src/guide/page.js @@ -7,6 +7,7 @@ import deprecated from '@wordpress/deprecated'; export default function GuidePage( props ) { useEffect( () => { deprecated( '', { + since: '8.2', alternative: 'the `pages` prop in ', } ); }, [] ); diff --git a/packages/components/src/higher-order/with-focus-return/index.js b/packages/components/src/higher-order/with-focus-return/index.js index c2a5db9a87a2ed..fb5507fc1a52b7 100644 --- a/packages/components/src/higher-order/with-focus-return/index.js +++ b/packages/components/src/higher-order/with-focus-return/index.js @@ -54,6 +54,7 @@ export default createHigherOrderComponent( ( options ) => { export const Provider = ( { children } ) => { deprecated( 'wp.components.FocusReturnProvider component', { + since: '9.6', hint: 'This provider is not used anymore. You can just remove it from your codebase', } ); diff --git a/packages/components/src/isolated-event-container/index.js b/packages/components/src/isolated-event-container/index.js index d3513953dd1314..e444deb525444e 100644 --- a/packages/components/src/isolated-event-container/index.js +++ b/packages/components/src/isolated-event-container/index.js @@ -9,7 +9,9 @@ function stopPropagation( event ) { } export default forwardRef( ( { children, ...props }, ref ) => { - deprecated( 'wp.components.IsolatedEventContainer' ); + deprecated( 'wp.components.IsolatedEventContainer', { + since: '9.6', + } ); // Disable reason: this stops certain events from propagating outside of the component. // - onMouseDown is disabled as this can cause interactions with other DOM elements diff --git a/packages/components/src/modal/index.js b/packages/components/src/modal/index.js index 925f28be42525d..30358d2d5e0a7b 100644 --- a/packages/components/src/modal/index.js +++ b/packages/components/src/modal/index.js @@ -122,6 +122,7 @@ class Modal extends Component { if ( isDismissable ) { deprecated( 'isDismissable prop of the Modal component', { + since: '6.7', alternative: 'isDismissible prop (renamed) of the Modal component', } ); diff --git a/packages/components/src/popover/index.js b/packages/components/src/popover/index.js index 06e077f9e5c40d..c3a4c538bbb262 100644 --- a/packages/components/src/popover/index.js +++ b/packages/components/src/popover/index.js @@ -544,6 +544,7 @@ const Popover = ( { } ); deprecated( 'Popover onClickOutside prop', { + since: '6.3', alternative: 'onFocusOutside', } ); diff --git a/packages/components/src/toolbar/index.js b/packages/components/src/toolbar/index.js index b94886bd9ce749..085613477d338b 100644 --- a/packages/components/src/toolbar/index.js +++ b/packages/components/src/toolbar/index.js @@ -28,6 +28,7 @@ import ToolbarContainer from './toolbar-container'; function Toolbar( { className, label, ...props }, ref ) { if ( ! label ) { deprecated( 'Using Toolbar without label prop', { + since: '8.8', alternative: 'ToolbarGroup component', link: 'https://developer.wordpress.org/block-editor/components/toolbar/', diff --git a/packages/compose/src/higher-order/with-global-events/index.js b/packages/compose/src/higher-order/with-global-events/index.js index 9c77c3ab2c4e5e..f9ff2efb429612 100644 --- a/packages/compose/src/higher-order/with-global-events/index.js +++ b/packages/compose/src/higher-order/with-global-events/index.js @@ -43,6 +43,7 @@ const listener = new Listener(); */ export default function withGlobalEvents( eventTypesToHandlers ) { deprecated( 'wp.compose.withGlobalEvents', { + since: '9.5', alternative: 'useEffect', } ); diff --git a/packages/compose/src/hooks/use-copy-on-click/index.js b/packages/compose/src/hooks/use-copy-on-click/index.js index 89f43193c5c2be..b7955e40ed1097 100644 --- a/packages/compose/src/hooks/use-copy-on-click/index.js +++ b/packages/compose/src/hooks/use-copy-on-click/index.js @@ -24,6 +24,7 @@ import deprecated from '@wordpress/deprecated'; */ export default function useCopyOnClick( ref, text, timeout = 4000 ) { deprecated( 'wp.compose.useCopyOnClick', { + since: '10.3', alternative: 'wp.compose.useCopyToClipboard', } ); diff --git a/packages/core-data/src/resolvers.js b/packages/core-data/src/resolvers.js index f227c05fb21437..62714c3dc39ca0 100644 --- a/packages/core-data/src/resolvers.js +++ b/packages/core-data/src/resolvers.js @@ -294,6 +294,7 @@ export function* getEmbedPreview( url ) { */ export function* hasUploadPermissions() { deprecated( "select( 'core' ).hasUploadPermissions()", { + since: '5.0', alternative: "select( 'core' ).canUser( 'create', 'media' )", } ); yield* canUser( 'create', 'media' ); diff --git a/packages/core-data/src/selectors.js b/packages/core-data/src/selectors.js index 5f4a9501f9bd54..19edf2ca00a7cd 100644 --- a/packages/core-data/src/selectors.js +++ b/packages/core-data/src/selectors.js @@ -634,6 +634,7 @@ export function isPreviewEmbedFallback( state, url ) { */ export function hasUploadPermissions( state ) { deprecated( "select( 'core' ).hasUploadPermissions()", { + since: '5.0', alternative: "select( 'core' ).canUser( 'create', 'media' )", } ); return defaultTo( canUser( state, 'create', 'media' ), true ); diff --git a/packages/data-controls/src/index.js b/packages/data-controls/src/index.js index 3e9fa9e9b6c75b..e75d90fed05078 100644 --- a/packages/data-controls/src/index.js +++ b/packages/data-controls/src/index.js @@ -39,6 +39,7 @@ export function apiFetch( request ) { */ export function select( ...args ) { deprecated( '`select` control in `@wordpress/data-controls`', { + since: '9.3', alternative: 'built-in `resolveSelect` control in `@wordpress/data`', } ); @@ -53,6 +54,7 @@ export function select( ...args ) { */ export function syncSelect( ...args ) { deprecated( '`syncSelect` control in `@wordpress/data-controls`', { + since: '9.3', alternative: 'built-in `select` control in `@wordpress/data`', } ); @@ -67,6 +69,7 @@ export function syncSelect( ...args ) { */ export function dispatch( ...args ) { deprecated( '`dispatch` control in `@wordpress/data-controls`', { + since: '9.3', alternative: 'built-in `dispatch` control in `@wordpress/data`', } ); diff --git a/packages/data/src/plugins/controls/index.js b/packages/data/src/plugins/controls/index.js index cd247c0b911b31..d442dfa7c1f26c 100644 --- a/packages/data/src/plugins/controls/index.js +++ b/packages/data/src/plugins/controls/index.js @@ -5,6 +5,7 @@ import deprecated from '@wordpress/deprecated'; export default ( registry ) => { deprecated( 'wp.data.plugins.controls', { + since: '5.4', hint: 'The controls plugins is now baked-in.', } ); return registry; diff --git a/packages/editor/src/components/deprecated.js b/packages/editor/src/components/deprecated.js index 04962bf9dbe957..30ccb7633866be 100644 --- a/packages/editor/src/components/deprecated.js +++ b/packages/editor/src/components/deprecated.js @@ -65,6 +65,7 @@ export { default as ServerSideRender } from '@wordpress/server-side-render'; function deprecateComponent( name, Wrapped, staticsToHoist = [] ) { const Component = forwardRef( ( props, ref ) => { deprecated( 'wp.editor.' + name, { + since: '5.9', alternative: 'wp.blockEditor.' + name, } ); @@ -84,6 +85,7 @@ function deprecateComponent( name, Wrapped, staticsToHoist = [] ) { function deprecateFunction( name, func ) { return ( ...args ) => { deprecated( 'wp.editor.' + name, { + since: '5.9', alternative: 'wp.blockEditor.' + name, } ); diff --git a/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js b/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js index 67397065ab5e60..6a92725cbe89d6 100644 --- a/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js +++ b/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js @@ -44,6 +44,7 @@ export default VisualEditorGlobalKeyboardShortcuts; export function EditorGlobalKeyboardShortcuts() { deprecated( 'EditorGlobalKeyboardShortcuts', { + since: '5.0', alternative: 'VisualEditorGlobalKeyboardShortcuts', plugin: 'Gutenberg', } ); diff --git a/packages/editor/src/store/actions.js b/packages/editor/src/store/actions.js index 4bfdf46e81c8c9..7134ec7e1372cc 100644 --- a/packages/editor/src/store/actions.js +++ b/packages/editor/src/store/actions.js @@ -114,6 +114,7 @@ export function resetPost( post ) { */ export function* resetAutosave( newAutosave ) { deprecated( 'resetAutosave action (`core/editor` store)', { + since: '5.6', alternative: 'receiveAutosaves action (`core` store)', plugin: 'Gutenberg', } ); @@ -161,6 +162,7 @@ export function __experimentalRequestPostUpdateFinish( options = {} ) { */ export function updatePost() { deprecated( "wp.data.dispatch( 'core/editor' ).updatePost", { + since: '9.7', alternative: 'User the core entitires store instead', } ); return { @@ -649,6 +651,7 @@ export function updateEditorSettings( settings ) { const getBlockEditorAction = ( name ) => function* ( ...args ) { deprecated( "`wp.data.dispatch( 'core/editor' )." + name + '`', { + since: '5.9', alternative: "`wp.data.dispatch( 'core/block-editor' )." + name + '`', } ); diff --git a/packages/editor/src/store/selectors.js b/packages/editor/src/store/selectors.js index 9c191e9219aa2c..ce56fb8c90abea 100644 --- a/packages/editor/src/store/selectors.js +++ b/packages/editor/src/store/selectors.js @@ -306,6 +306,7 @@ export const getReferenceByDistinctEdits = createRegistrySelector( deprecated( "`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`", { + since: '6.5', alternative: "`wp.data.select( 'core' ).getReferenceByDistinctEdits`", } @@ -685,6 +686,7 @@ export const isEditedPostAutosaveable = createRegistrySelector( */ export const getAutosave = createRegistrySelector( ( select ) => ( state ) => { deprecated( "`wp.data.select( 'core/editor' ).getAutosave()`", { + since: '5.6', alternative: "`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`", plugin: 'Gutenberg', @@ -713,6 +715,7 @@ export const getAutosave = createRegistrySelector( ( select ) => ( state ) => { */ export const hasAutosave = createRegistrySelector( ( select ) => ( state ) => { deprecated( "`wp.data.select( 'core/editor' ).hasAutosave()`", { + since: '5.6', alternative: "`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`", plugin: 'Gutenberg', @@ -953,6 +956,7 @@ export function getSuggestedPostFormat( state ) { */ export function getBlocksForSerialization( state ) { deprecated( '`core/editor` getBlocksForSerialization selector', { + since: '6.2', plugin: 'Gutenberg', alternative: 'getEditorBlocks', hint: 'Blocks serialization pre-processing occurs at save time', @@ -1235,6 +1239,7 @@ export function getEditorBlocks( state ) { */ export function getEditorSelectionStart( state ) { deprecated( "select('core/editor').getEditorSelectionStart", { + since: '10.0', alternative: "select('core/editor').getEditorSelection", } ); return getEditedPostAttribute( state, 'selection' )?.selectionStart; @@ -1250,6 +1255,7 @@ export function getEditorSelectionStart( state ) { */ export function getEditorSelectionEnd( state ) { deprecated( "select('core/editor').getEditorSelectionStart", { + since: '10.0', alternative: "select('core/editor').getEditorSelection", } ); return getEditedPostAttribute( state, 'selection' )?.selectionEnd; @@ -1298,6 +1304,7 @@ export function getEditorSettings( state ) { */ export function getStateBeforeOptimisticTransaction() { deprecated( "select('core/editor').getStateBeforeOptimisticTransaction", { + since: '9.7', hint: 'No state history is kept on this store anymore', } ); @@ -1311,6 +1318,7 @@ export function getStateBeforeOptimisticTransaction() { */ export function inSomeHistory() { deprecated( "select('core/editor').inSomeHistory", { + since: '9.7', hint: 'No state history is kept on this store anymore', } ); return false; @@ -1319,6 +1327,7 @@ export function inSomeHistory() { function getBlockEditorSelector( name ) { return createRegistrySelector( ( select ) => ( state, ...args ) => { deprecated( "`wp.data.select( 'core/editor' )." + name + '`', { + since: '5.9', alternative: "`wp.data.select( 'core/block-editor' )." + name + '`', } ); diff --git a/packages/interface/src/components/action-item/index.js b/packages/interface/src/components/action-item/index.js index 2474b4fd011892..b79f6233d8c7e4 100644 --- a/packages/interface/src/components/action-item/index.js +++ b/packages/interface/src/components/action-item/index.js @@ -21,6 +21,7 @@ function ActionItemSlot( { deprecated( 'Passing a tuple of components with `as` prop to `ActionItem.Slot` component', { + since: '10.2', alternative: 'a component with `as` prop', version: '10.3', } diff --git a/packages/nux/src/index.js b/packages/nux/src/index.js index ffd4a5e8818828..05a9ec971e34c5 100644 --- a/packages/nux/src/index.js +++ b/packages/nux/src/index.js @@ -7,5 +7,6 @@ export { store } from './store'; export { default as DotTip } from './components/dot-tip'; deprecated( 'wp.nux', { + since: '7.2', hint: 'wp.components.Guide can be used to show a user guide.', } ); diff --git a/packages/server-side-render/src/index.js b/packages/server-side-render/src/index.js index cec07d826d1c77..8c2addcc93dee8 100644 --- a/packages/server-side-render/src/index.js +++ b/packages/server-side-render/src/index.js @@ -43,6 +43,7 @@ const ExportedServerSideRender = withSelect( ( select ) => { if ( window && window.wp && window.wp.components ) { window.wp.components.ServerSideRender = forwardRef( ( props, ref ) => { deprecated( 'wp.components.ServerSideRender', { + since: '6.3', alternative: 'wp.serverSideRender', } ); return ; From aa9120bbd796456d426cff686b185cb99d80224f Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 24 Mar 2021 13:36:16 +0400 Subject: [PATCH 2/3] Use WP versions in deprecation notices --- .../src/components/block-card/index.js | 2 +- .../src/components/block-list/block-wrapper.js | 2 +- .../src/components/media-placeholder/index.js | 2 +- .../src/components/navigable-toolbar/index.js | 2 +- .../components/preserve-scroll-in-reorder/index.js | 2 +- .../block-editor/src/components/rich-text/index.js | 4 ++-- packages/blocks/src/api/raw-handling/index.js | 2 +- packages/components/src/button/deprecated.js | 2 +- packages/components/src/button/index.js | 2 +- packages/components/src/dropdown-menu/index.js | 4 ++-- packages/components/src/guide/index.js | 2 +- packages/components/src/guide/page.js | 2 +- .../src/higher-order/with-focus-return/index.js | 2 +- .../src/isolated-event-container/index.js | 2 +- packages/components/src/modal/index.js | 2 +- packages/components/src/popover/index.js | 2 +- packages/components/src/toolbar/index.js | 2 +- .../src/higher-order/with-global-events/index.js | 2 +- packages/core-data/src/resolvers.js | 2 +- packages/core-data/src/selectors.js | 2 +- packages/data-controls/src/index.js | 6 +++--- packages/editor/src/components/deprecated.js | 4 ++-- .../visual-editor-shortcuts.js | 3 +-- packages/editor/src/store/actions.js | 6 +++--- packages/editor/src/store/selectors.js | 14 +++++++------- packages/nux/src/index.js | 2 +- packages/server-side-render/src/index.js | 2 +- 27 files changed, 40 insertions(+), 41 deletions(-) diff --git a/packages/block-editor/src/components/block-card/index.js b/packages/block-editor/src/components/block-card/index.js index bead93e1bbcb98..21832629b9557f 100644 --- a/packages/block-editor/src/components/block-card/index.js +++ b/packages/block-editor/src/components/block-card/index.js @@ -11,7 +11,7 @@ import BlockIcon from '../block-icon'; function BlockCard( { title, icon, description, blockType } ) { if ( blockType ) { deprecated( '`blockType` property in `BlockCard component`', { - since: '9.7', + since: '5.7', alternative: '`title, icon and description` properties', } ); ( { title, icon, description } = blockType ); diff --git a/packages/block-editor/src/components/block-list/block-wrapper.js b/packages/block-editor/src/components/block-list/block-wrapper.js index 4d77c039236631..a06a644320cda9 100644 --- a/packages/block-editor/src/components/block-list/block-wrapper.js +++ b/packages/block-editor/src/components/block-list/block-wrapper.js @@ -13,7 +13,7 @@ import { useBlockProps } from './use-block-props'; const BlockComponent = forwardRef( ( { children, tagName: TagName = 'div', ...props }, ref ) => { deprecated( 'wp.blockEditor.__experimentalBlock', { - since: '9.1', + since: '5.6', alternative: 'wp.blockEditor.useBlockProps', } ); const blockProps = useBlockProps( { ...props, ref } ); diff --git a/packages/block-editor/src/components/media-placeholder/index.js b/packages/block-editor/src/components/media-placeholder/index.js index 28a13f74d61db1..b460e20755e57e 100644 --- a/packages/block-editor/src/components/media-placeholder/index.js +++ b/packages/block-editor/src/components/media-placeholder/index.js @@ -391,7 +391,7 @@ export function MediaPlaceholder( { if ( dropZoneUIOnly || disableMediaButtons ) { if ( dropZoneUIOnly ) { deprecated( 'wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop', { - since: '6.6', + since: '5.4', alternative: 'disableMediaButtons', } ); } diff --git a/packages/block-editor/src/components/navigable-toolbar/index.js b/packages/block-editor/src/components/navigable-toolbar/index.js index 3baca0419f0d12..b01220d6461aaf 100644 --- a/packages/block-editor/src/components/navigable-toolbar/index.js +++ b/packages/block-editor/src/components/navigable-toolbar/index.js @@ -61,7 +61,7 @@ function useIsAccessibleToolbar( ref ) { const onlyToolbarItem = hasOnlyToolbarItem( tabbables ); if ( ! onlyToolbarItem ) { deprecated( 'Using custom components as toolbar controls', { - since: '8.8', + since: '5.6', alternative: 'ToolbarItem or ToolbarButton components', link: 'https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols', diff --git a/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js b/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js index 9d3ce5e2181fc5..37da4295a062e1 100644 --- a/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js +++ b/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js @@ -5,7 +5,7 @@ import deprecated from '@wordpress/deprecated'; export default function PreserveScrollInReorder() { deprecated( 'PreserveScrollInReorder component', { - since: '6.6', + since: '5.4', hint: 'This behavior is now built-in the block list', } ); return null; diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 96fe50d8f8dcaf..4a4e53b2877b49 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -101,7 +101,7 @@ function getAllowedFormats( { } deprecated( 'wp.blockEditor.RichText formattingControls prop', { - since: '6.2', + since: '5.4', alternative: 'allowedFormats', } ); @@ -717,7 +717,7 @@ function RichTextWrapper( } deprecated( 'wp.blockEditor.RichText wrapperClassName prop', { - since: '6.7', + since: '5.4', alternative: 'className prop or create your own wrapper div', } ); diff --git a/packages/blocks/src/api/raw-handling/index.js b/packages/blocks/src/api/raw-handling/index.js index 3e0b663cb11251..cc2c48fb80584c 100644 --- a/packages/blocks/src/api/raw-handling/index.js +++ b/packages/blocks/src/api/raw-handling/index.js @@ -26,7 +26,7 @@ export { pasteHandler } from './paste-handler'; export function deprecatedGetPhrasingContentSchema( context ) { deprecated( 'wp.blocks.getPhrasingContentSchema', { - since: '8.9', + since: '5.6', alternative: 'wp.dom.getPhrasingContentSchema', } ); return getPhrasingContentSchema( context ); diff --git a/packages/components/src/button/deprecated.js b/packages/components/src/button/deprecated.js index 89e30c98996d2e..34e99bd71f54a5 100644 --- a/packages/components/src/button/deprecated.js +++ b/packages/components/src/button/deprecated.js @@ -11,7 +11,7 @@ import Button from '../button'; function IconButton( { labelPosition, size, tooltip, label, ...props }, ref ) { deprecated( 'wp.components.IconButton', { - since: '7.2', + since: '5.4', alternative: 'wp.components.Button', } ); diff --git a/packages/components/src/button/index.js b/packages/components/src/button/index.js index 344806f6a13f24..3415fb2a276369 100644 --- a/packages/components/src/button/index.js +++ b/packages/components/src/button/index.js @@ -51,7 +51,7 @@ export function Button( props, ref ) { if ( isDefault ) { deprecated( 'Button isDefault prop', { - since: '7.2', + since: '5.4', alternative: 'isSecondary', } ); } diff --git a/packages/components/src/dropdown-menu/index.js b/packages/components/src/dropdown-menu/index.js index 291b5a901a75f2..3b2bec0988e76e 100644 --- a/packages/components/src/dropdown-menu/index.js +++ b/packages/components/src/dropdown-menu/index.js @@ -54,7 +54,7 @@ function DropdownMenu( { } ) { if ( menuLabel ) { deprecated( '`menuLabel` prop in `DropdownComponent`', { - since: '6.3', + since: '5.3', alternative: '`menuProps` object and its `aria-label` property', plugin: 'Gutenberg', } ); @@ -62,7 +62,7 @@ function DropdownMenu( { if ( position ) { deprecated( '`position` prop in `DropdownComponent`', { - since: '6.3', + since: '5.3', alternative: '`popoverProps` object and its `position` property', plugin: 'Gutenberg', } ); diff --git a/packages/components/src/guide/index.js b/packages/components/src/guide/index.js index 415f7c270a188d..dc0a4f22613e51 100644 --- a/packages/components/src/guide/index.js +++ b/packages/components/src/guide/index.js @@ -32,7 +32,7 @@ export default function Guide( { useEffect( () => { if ( Children.count( children ) ) { deprecated( 'Passing children to ', { - since: '8.2', + since: '5.5', alternative: 'the `pages` prop', } ); } diff --git a/packages/components/src/guide/page.js b/packages/components/src/guide/page.js index 61444977e95be6..2b8cec1af5492c 100644 --- a/packages/components/src/guide/page.js +++ b/packages/components/src/guide/page.js @@ -7,7 +7,7 @@ import deprecated from '@wordpress/deprecated'; export default function GuidePage( props ) { useEffect( () => { deprecated( '', { - since: '8.2', + since: '5.5', alternative: 'the `pages` prop in ', } ); }, [] ); diff --git a/packages/components/src/higher-order/with-focus-return/index.js b/packages/components/src/higher-order/with-focus-return/index.js index fb5507fc1a52b7..8f585c9b4d7178 100644 --- a/packages/components/src/higher-order/with-focus-return/index.js +++ b/packages/components/src/higher-order/with-focus-return/index.js @@ -54,7 +54,7 @@ export default createHigherOrderComponent( ( options ) => { export const Provider = ( { children } ) => { deprecated( 'wp.components.FocusReturnProvider component', { - since: '9.6', + since: '5.7', hint: 'This provider is not used anymore. You can just remove it from your codebase', } ); diff --git a/packages/components/src/isolated-event-container/index.js b/packages/components/src/isolated-event-container/index.js index e444deb525444e..4c856ff2a2019f 100644 --- a/packages/components/src/isolated-event-container/index.js +++ b/packages/components/src/isolated-event-container/index.js @@ -10,7 +10,7 @@ function stopPropagation( event ) { export default forwardRef( ( { children, ...props }, ref ) => { deprecated( 'wp.components.IsolatedEventContainer', { - since: '9.6', + since: '5.7', } ); // Disable reason: this stops certain events from propagating outside of the component. diff --git a/packages/components/src/modal/index.js b/packages/components/src/modal/index.js index 30358d2d5e0a7b..2144972d42f187 100644 --- a/packages/components/src/modal/index.js +++ b/packages/components/src/modal/index.js @@ -122,7 +122,7 @@ class Modal extends Component { if ( isDismissable ) { deprecated( 'isDismissable prop of the Modal component', { - since: '6.7', + since: '5.4', alternative: 'isDismissible prop (renamed) of the Modal component', } ); diff --git a/packages/components/src/popover/index.js b/packages/components/src/popover/index.js index c3a4c538bbb262..0cb8a975344fad 100644 --- a/packages/components/src/popover/index.js +++ b/packages/components/src/popover/index.js @@ -544,7 +544,7 @@ const Popover = ( { } ); deprecated( 'Popover onClickOutside prop', { - since: '6.3', + since: '5.3', alternative: 'onFocusOutside', } ); diff --git a/packages/components/src/toolbar/index.js b/packages/components/src/toolbar/index.js index 085613477d338b..3bb887cc1fd335 100644 --- a/packages/components/src/toolbar/index.js +++ b/packages/components/src/toolbar/index.js @@ -28,7 +28,7 @@ import ToolbarContainer from './toolbar-container'; function Toolbar( { className, label, ...props }, ref ) { if ( ! label ) { deprecated( 'Using Toolbar without label prop', { - since: '8.8', + since: '5.6', alternative: 'ToolbarGroup component', link: 'https://developer.wordpress.org/block-editor/components/toolbar/', diff --git a/packages/compose/src/higher-order/with-global-events/index.js b/packages/compose/src/higher-order/with-global-events/index.js index f9ff2efb429612..6e0a2ad57f7c6b 100644 --- a/packages/compose/src/higher-order/with-global-events/index.js +++ b/packages/compose/src/higher-order/with-global-events/index.js @@ -43,7 +43,7 @@ const listener = new Listener(); */ export default function withGlobalEvents( eventTypesToHandlers ) { deprecated( 'wp.compose.withGlobalEvents', { - since: '9.5', + since: '5.7', alternative: 'useEffect', } ); diff --git a/packages/core-data/src/resolvers.js b/packages/core-data/src/resolvers.js index 62714c3dc39ca0..1d210f8a7b4b08 100644 --- a/packages/core-data/src/resolvers.js +++ b/packages/core-data/src/resolvers.js @@ -294,7 +294,7 @@ export function* getEmbedPreview( url ) { */ export function* hasUploadPermissions() { deprecated( "select( 'core' ).hasUploadPermissions()", { - since: '5.0', + since: '5.2', alternative: "select( 'core' ).canUser( 'create', 'media' )", } ); yield* canUser( 'create', 'media' ); diff --git a/packages/core-data/src/selectors.js b/packages/core-data/src/selectors.js index 19edf2ca00a7cd..8414a5b51c8c88 100644 --- a/packages/core-data/src/selectors.js +++ b/packages/core-data/src/selectors.js @@ -634,7 +634,7 @@ export function isPreviewEmbedFallback( state, url ) { */ export function hasUploadPermissions( state ) { deprecated( "select( 'core' ).hasUploadPermissions()", { - since: '5.0', + since: '5.2', alternative: "select( 'core' ).canUser( 'create', 'media' )", } ); return defaultTo( canUser( state, 'create', 'media' ), true ); diff --git a/packages/data-controls/src/index.js b/packages/data-controls/src/index.js index e75d90fed05078..62671b41f139ff 100644 --- a/packages/data-controls/src/index.js +++ b/packages/data-controls/src/index.js @@ -39,7 +39,7 @@ export function apiFetch( request ) { */ export function select( ...args ) { deprecated( '`select` control in `@wordpress/data-controls`', { - since: '9.3', + since: '5.7', alternative: 'built-in `resolveSelect` control in `@wordpress/data`', } ); @@ -54,7 +54,7 @@ export function select( ...args ) { */ export function syncSelect( ...args ) { deprecated( '`syncSelect` control in `@wordpress/data-controls`', { - since: '9.3', + since: '5.7', alternative: 'built-in `select` control in `@wordpress/data`', } ); @@ -69,7 +69,7 @@ export function syncSelect( ...args ) { */ export function dispatch( ...args ) { deprecated( '`dispatch` control in `@wordpress/data-controls`', { - since: '9.3', + since: '5.7', alternative: 'built-in `dispatch` control in `@wordpress/data`', } ); diff --git a/packages/editor/src/components/deprecated.js b/packages/editor/src/components/deprecated.js index 30ccb7633866be..86f3f0b1d52901 100644 --- a/packages/editor/src/components/deprecated.js +++ b/packages/editor/src/components/deprecated.js @@ -65,7 +65,7 @@ export { default as ServerSideRender } from '@wordpress/server-side-render'; function deprecateComponent( name, Wrapped, staticsToHoist = [] ) { const Component = forwardRef( ( props, ref ) => { deprecated( 'wp.editor.' + name, { - since: '5.9', + since: '5.3', alternative: 'wp.blockEditor.' + name, } ); @@ -85,7 +85,7 @@ function deprecateComponent( name, Wrapped, staticsToHoist = [] ) { function deprecateFunction( name, func ) { return ( ...args ) => { deprecated( 'wp.editor.' + name, { - since: '5.9', + since: '5.3', alternative: 'wp.blockEditor.' + name, } ); diff --git a/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js b/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js index 6a92725cbe89d6..0b4e6ddbc6146d 100644 --- a/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js +++ b/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js @@ -44,9 +44,8 @@ export default VisualEditorGlobalKeyboardShortcuts; export function EditorGlobalKeyboardShortcuts() { deprecated( 'EditorGlobalKeyboardShortcuts', { - since: '5.0', + since: '5.2', alternative: 'VisualEditorGlobalKeyboardShortcuts', - plugin: 'Gutenberg', } ); return ; diff --git a/packages/editor/src/store/actions.js b/packages/editor/src/store/actions.js index 7134ec7e1372cc..7f98c0b6338316 100644 --- a/packages/editor/src/store/actions.js +++ b/packages/editor/src/store/actions.js @@ -114,7 +114,7 @@ export function resetPost( post ) { */ export function* resetAutosave( newAutosave ) { deprecated( 'resetAutosave action (`core/editor` store)', { - since: '5.6', + since: '5.3', alternative: 'receiveAutosaves action (`core` store)', plugin: 'Gutenberg', } ); @@ -162,7 +162,7 @@ export function __experimentalRequestPostUpdateFinish( options = {} ) { */ export function updatePost() { deprecated( "wp.data.dispatch( 'core/editor' ).updatePost", { - since: '9.7', + since: '5.7', alternative: 'User the core entitires store instead', } ); return { @@ -651,7 +651,7 @@ export function updateEditorSettings( settings ) { const getBlockEditorAction = ( name ) => function* ( ...args ) { deprecated( "`wp.data.dispatch( 'core/editor' )." + name + '`', { - since: '5.9', + since: '5.3', alternative: "`wp.data.dispatch( 'core/block-editor' )." + name + '`', } ); diff --git a/packages/editor/src/store/selectors.js b/packages/editor/src/store/selectors.js index ce56fb8c90abea..987ed8aca2e5e0 100644 --- a/packages/editor/src/store/selectors.js +++ b/packages/editor/src/store/selectors.js @@ -306,7 +306,7 @@ export const getReferenceByDistinctEdits = createRegistrySelector( deprecated( "`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`", { - since: '6.5', + since: '5.4', alternative: "`wp.data.select( 'core' ).getReferenceByDistinctEdits`", } @@ -686,7 +686,7 @@ export const isEditedPostAutosaveable = createRegistrySelector( */ export const getAutosave = createRegistrySelector( ( select ) => ( state ) => { deprecated( "`wp.data.select( 'core/editor' ).getAutosave()`", { - since: '5.6', + since: '5.3', alternative: "`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`", plugin: 'Gutenberg', @@ -715,7 +715,7 @@ export const getAutosave = createRegistrySelector( ( select ) => ( state ) => { */ export const hasAutosave = createRegistrySelector( ( select ) => ( state ) => { deprecated( "`wp.data.select( 'core/editor' ).hasAutosave()`", { - since: '5.6', + since: '5.3', alternative: "`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`", plugin: 'Gutenberg', @@ -956,7 +956,7 @@ export function getSuggestedPostFormat( state ) { */ export function getBlocksForSerialization( state ) { deprecated( '`core/editor` getBlocksForSerialization selector', { - since: '6.2', + since: '5.3', plugin: 'Gutenberg', alternative: 'getEditorBlocks', hint: 'Blocks serialization pre-processing occurs at save time', @@ -1304,7 +1304,7 @@ export function getEditorSettings( state ) { */ export function getStateBeforeOptimisticTransaction() { deprecated( "select('core/editor').getStateBeforeOptimisticTransaction", { - since: '9.7', + since: '5.7', hint: 'No state history is kept on this store anymore', } ); @@ -1318,7 +1318,7 @@ export function getStateBeforeOptimisticTransaction() { */ export function inSomeHistory() { deprecated( "select('core/editor').inSomeHistory", { - since: '9.7', + since: '5.7', hint: 'No state history is kept on this store anymore', } ); return false; @@ -1327,7 +1327,7 @@ export function inSomeHistory() { function getBlockEditorSelector( name ) { return createRegistrySelector( ( select ) => ( state, ...args ) => { deprecated( "`wp.data.select( 'core/editor' )." + name + '`', { - since: '5.9', + since: '5.3', alternative: "`wp.data.select( 'core/block-editor' )." + name + '`', } ); diff --git a/packages/nux/src/index.js b/packages/nux/src/index.js index 05a9ec971e34c5..33f9f766c2b827 100644 --- a/packages/nux/src/index.js +++ b/packages/nux/src/index.js @@ -7,6 +7,6 @@ export { store } from './store'; export { default as DotTip } from './components/dot-tip'; deprecated( 'wp.nux', { - since: '7.2', + since: '5.4', hint: 'wp.components.Guide can be used to show a user guide.', } ); diff --git a/packages/server-side-render/src/index.js b/packages/server-side-render/src/index.js index 8c2addcc93dee8..30af329d429a5f 100644 --- a/packages/server-side-render/src/index.js +++ b/packages/server-side-render/src/index.js @@ -43,7 +43,7 @@ const ExportedServerSideRender = withSelect( ( select ) => { if ( window && window.wp && window.wp.components ) { window.wp.components.ServerSideRender = forwardRef( ( props, ref ) => { deprecated( 'wp.components.ServerSideRender', { - since: '6.3', + since: '5.3', alternative: 'wp.serverSideRender', } ); return ; From 3a79214ad2e47b5653369da55425f71bf10a8d33 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 24 Mar 2021 13:58:14 +0400 Subject: [PATCH 3/3] Add plugin argument when since version points to Gutenberg --- packages/block-editor/src/store/actions.js | 1 + packages/block-library/src/text-columns/edit.js | 2 +- packages/components/src/clipboard-button/index.js | 1 + packages/components/src/dropdown-menu/index.js | 2 -- packages/compose/src/hooks/use-copy-on-click/index.js | 1 + packages/editor/src/store/actions.js | 1 - packages/editor/src/store/selectors.js | 5 ++--- packages/interface/src/components/action-item/index.js | 1 + 8 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/block-editor/src/store/actions.js b/packages/block-editor/src/store/actions.js index 75a3706d31c80b..aad215e14ae50c 100644 --- a/packages/block-editor/src/store/actions.js +++ b/packages/block-editor/src/store/actions.js @@ -575,6 +575,7 @@ export function* insertBlocks( initialPosition = 0; deprecated( "meta argument in wp.data.dispatch('core/block-editor')", { since: '10.1', + plugin: 'Gutenberg', hint: 'The meta argument is now the 6th argument of the function', } ); } diff --git a/packages/block-library/src/text-columns/edit.js b/packages/block-library/src/text-columns/edit.js index ec69c75e1a4a9e..d9e2a0c6c1fd9f 100644 --- a/packages/block-library/src/text-columns/edit.js +++ b/packages/block-library/src/text-columns/edit.js @@ -21,8 +21,8 @@ export default function TextColumnsEdit( { attributes, setAttributes } ) { const { width, content, columns } = attributes; deprecated( 'The Text Columns block', { + since: '5.3', alternative: 'the Columns block', - plugin: 'Gutenberg', } ); return ( diff --git a/packages/components/src/clipboard-button/index.js b/packages/components/src/clipboard-button/index.js index a2a454ddc682fc..f73ab80c11a3ad 100644 --- a/packages/components/src/clipboard-button/index.js +++ b/packages/components/src/clipboard-button/index.js @@ -27,6 +27,7 @@ export default function ClipboardButton( { } ) { deprecated( 'wp.components.ClipboardButton', { since: '10.3', + plugin: 'Gutenberg', alternative: 'wp.compose.useCopyToClipboard', } ); diff --git a/packages/components/src/dropdown-menu/index.js b/packages/components/src/dropdown-menu/index.js index 3b2bec0988e76e..45f4e67c613c6d 100644 --- a/packages/components/src/dropdown-menu/index.js +++ b/packages/components/src/dropdown-menu/index.js @@ -56,7 +56,6 @@ function DropdownMenu( { deprecated( '`menuLabel` prop in `DropdownComponent`', { since: '5.3', alternative: '`menuProps` object and its `aria-label` property', - plugin: 'Gutenberg', } ); } @@ -64,7 +63,6 @@ function DropdownMenu( { deprecated( '`position` prop in `DropdownComponent`', { since: '5.3', alternative: '`popoverProps` object and its `position` property', - plugin: 'Gutenberg', } ); } diff --git a/packages/compose/src/hooks/use-copy-on-click/index.js b/packages/compose/src/hooks/use-copy-on-click/index.js index b7955e40ed1097..33a14c0224add3 100644 --- a/packages/compose/src/hooks/use-copy-on-click/index.js +++ b/packages/compose/src/hooks/use-copy-on-click/index.js @@ -25,6 +25,7 @@ import deprecated from '@wordpress/deprecated'; export default function useCopyOnClick( ref, text, timeout = 4000 ) { deprecated( 'wp.compose.useCopyOnClick', { since: '10.3', + plugin: 'Gutenberg', alternative: 'wp.compose.useCopyToClipboard', } ); diff --git a/packages/editor/src/store/actions.js b/packages/editor/src/store/actions.js index 7f98c0b6338316..ec712f1a9ee9f4 100644 --- a/packages/editor/src/store/actions.js +++ b/packages/editor/src/store/actions.js @@ -116,7 +116,6 @@ export function* resetAutosave( newAutosave ) { deprecated( 'resetAutosave action (`core/editor` store)', { since: '5.3', alternative: 'receiveAutosaves action (`core` store)', - plugin: 'Gutenberg', } ); const postId = yield controls.select( STORE_NAME, 'getCurrentPostId' ); diff --git a/packages/editor/src/store/selectors.js b/packages/editor/src/store/selectors.js index 987ed8aca2e5e0..75ca25a169a81d 100644 --- a/packages/editor/src/store/selectors.js +++ b/packages/editor/src/store/selectors.js @@ -689,7 +689,6 @@ export const getAutosave = createRegistrySelector( ( select ) => ( state ) => { since: '5.3', alternative: "`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`", - plugin: 'Gutenberg', } ); const postType = getCurrentPostType( state ); @@ -718,7 +717,6 @@ export const hasAutosave = createRegistrySelector( ( select ) => ( state ) => { since: '5.3', alternative: "`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`", - plugin: 'Gutenberg', } ); const postType = getCurrentPostType( state ); @@ -957,7 +955,6 @@ export function getSuggestedPostFormat( state ) { export function getBlocksForSerialization( state ) { deprecated( '`core/editor` getBlocksForSerialization selector', { since: '5.3', - plugin: 'Gutenberg', alternative: 'getEditorBlocks', hint: 'Blocks serialization pre-processing occurs at save time', } ); @@ -1240,6 +1237,7 @@ export function getEditorBlocks( state ) { export function getEditorSelectionStart( state ) { deprecated( "select('core/editor').getEditorSelectionStart", { since: '10.0', + plugin: 'Gutenberg', alternative: "select('core/editor').getEditorSelection", } ); return getEditedPostAttribute( state, 'selection' )?.selectionStart; @@ -1256,6 +1254,7 @@ export function getEditorSelectionStart( state ) { export function getEditorSelectionEnd( state ) { deprecated( "select('core/editor').getEditorSelectionStart", { since: '10.0', + plugin: 'Gutenberg', alternative: "select('core/editor').getEditorSelection", } ); return getEditedPostAttribute( state, 'selection' )?.selectionEnd; diff --git a/packages/interface/src/components/action-item/index.js b/packages/interface/src/components/action-item/index.js index b79f6233d8c7e4..23d3e147eefe3c 100644 --- a/packages/interface/src/components/action-item/index.js +++ b/packages/interface/src/components/action-item/index.js @@ -22,6 +22,7 @@ function ActionItemSlot( { 'Passing a tuple of components with `as` prop to `ActionItem.Slot` component', { since: '10.2', + plugin: 'Gutenberg', alternative: 'a component with `as` prop', version: '10.3', }