For features included in the Gutenberg plugin, the deprecation policy is intended to support backward compatibility for two minor plugin releases, when possible. Features and code included in a stable release of WordPress are not included in this deprecation timeline, and are instead subject to the versioning policies of the WordPress project. The current deprecations are listed below and are grouped by the version at which they will be removed completely. If your plugin depends on these behaviors, you must update to the recommended alternative before the noted version.
Unreleased
wp.blocks.isValidBlockContent
has been removed. Please usewp.blocks.validateBlock
instead.
11.0.0
wp.blocks.registerBlockTypeFromMetadata
method has been removed. Usewp.blocks.registerBlockType
method instead.
10.3.0
- Passing a tuple of components with
as
prop toActionItem.Slot
component is no longer supported. Please pass a component withas
prop instead. Example:
“`diff
<ActionItem.Slot
name=”my/slot”
label={ __( ‘My slot’ ) }- as={ [ MenuGroup, MenuItem ] }
- as={ MenuGroup }
/>
“`
9.7.0
leftSidebar
prop inInterfaceSkeleton
component has been removed. UsesecondarySidebar
prop instead.
8.6.0
- Block API integration with Block Context was updated. When registering a block use
usesContext
andprovidesContext
pair in JavaScript files anduses_context
andprovides_context
pair in PHP files instead of previous paircontext
andprovidesContext
.
8.3.0
- The PHP function
gutenberg_get_post_from_context
has been removed. Use Block Context instead. - The old Block Pattern APIs
register_pattern
/unregister_pattern
have been removed. Use the new functions instead.
5.5.0
- The PHP function
gutenberg_init
has been removed. - The PHP function
is_gutenberg_page
has been removed. UseWP_Screen::is_block_editor
instead. - The PHP function
the_gutenberg_project
has been removed. - The PHP function
gutenberg_default_post_format_template
has been removed. - The PHP function
gutenberg_get_available_image_sizes
has been removed. - The PHP function
gutenberg_get_autosave_newer_than_post_save
has been removed. - The PHP function
gutenberg_editor_scripts_and_styles
has been removed.
5.4.0
- The PHP function
gutenberg_load_plugin_textdomain
has been removed. - The PHP function
gutenberg_get_jed_locale_data
has been removed. - The PHP function
gutenberg_load_locale_data
has been removed.
5.3.0
- The PHP function
gutenberg_redirect_to_classic_editor_when_saving_posts
has been removed. - The PHP function
gutenberg_revisions_link_to_editor
has been removed. - The PHP function
gutenberg_remember_classic_editor_when_saving_posts
has been removed. - The PHP function
gutenberg_can_edit_post_type
has been removed. Useuse_block_editor_for_post_type
instead. - The PHP function
gutenberg_can_edit_post
has been removed. Useuse_block_editor_for_post
instead.
5.2.0
- The PHP function
gutenberg_parse_blocks
has been removed. Useparse_blocks
instead. - The PHP function
get_dynamic_blocks_regex
has been removed. - The PHP function
gutenberg_render_block
has been removed. Userender_block
instead. - The PHP function
strip_dynamic_blocks
has been removed. For use in excerpt preparation, considerexcerpt_remove_blocks
instead. - The PHP function
strip_dynamic_blocks_add_filter
has been removed. - The PHP function
strip_dynamic_blocks_remove_filter
has been removed. - The PHP function
gutenberg_post_has_blocks
has been removed. Usehas_blocks
instead. - The PHP function
gutenberg_content_has_blocks
has been removed. Usehas_blocks
instead. - The PHP function
gutenberg_register_rest_routes
has been removed. - The PHP function
gutenberg_add_taxonomy_visibility_field
has been removed. - The PHP function
gutenberg_get_taxonomy_visibility_data
has been removed. - The PHP function
gutenberg_add_permalink_template_to_posts
has been removed. - The PHP function
gutenberg_add_block_format_to_post_content
has been removed. - The PHP function
gutenberg_add_target_schema_to_links
has been removed. - The PHP function
gutenberg_register_post_prepare_functions
has been removed. - The PHP function
gutenberg_silence_rest_errors
has been removed. - The PHP function
gutenberg_filter_post_type_labels
has been removed. - The PHP function
gutenberg_preload_api_request
has been removed. Userest_preload_api_request
instead. - The PHP function
gutenberg_remove_wpcom_markdown_support
has been removed. - The PHP function
gutenberg_add_gutenberg_post_state
has been removed. - The PHP function
gutenberg_bulk_post_updated_messages
has been removed. - The PHP function
gutenberg_kses_allowedtags
has been removed. - The PHP function
gutenberg_add_responsive_body_class
has been removed. - The PHP function
gutenberg_add_edit_link_filters
has been removed. - The PHP function
gutenberg_add_edit_link
has been removed. - The PHP function
gutenberg_block_bulk_actions
has been removed. - The PHP function
gutenberg_replace_default_add_new_button
has been removed. - The PHP function
gutenberg_content_block_version
has been removed. Useblock_version
instead. - The PHP function
gutenberg_get_block_categories
has been removed. Useget_block_categories
instead. - The PHP function
register_tinymce_scripts
has been removed. Usewp_register_tinymce_scripts
instead. - The PHP function
gutenberg_register_post_types
has been removed. - The
gutenberg
theme support option has been removed. Usealign-wide
instead. - The PHP function
gutenberg_prepare_blocks_for_js
has been removed. Useget_block_editor_server_block_settings
instead. - The PHP function
gutenberg_load_list_reusable_blocks
has been removed. - The PHP function
_gutenberg_utf8_split
has been removed. Use_mb_substr
instead. - The PHP function
gutenberg_disable_editor_settings_wpautop
has been removed. - The PHP function
gutenberg_add_rest_nonce_to_heartbeat_response_headers
has been removed. - The PHP function
gutenberg_check_if_classic_needs_warning_about_blocks
has been removed. - The PHP function
gutenberg_warn_classic_about_blocks
has been removed. - The PHP function
gutenberg_show_privacy_policy_help_text
has been removed. - The PHP function
gutenberg_common_scripts_and_styles
has been removed. Usewp_common_block_scripts_and_styles
instead. - The PHP function
gutenberg_enqueue_registered_block_scripts_and_styles
has been removed. Usewp_enqueue_registered_block_scripts_and_styles
instead. - The PHP function
gutenberg_meta_box_save
has been removed. - The PHP function
gutenberg_meta_box_save_redirect
has been removed. - The PHP function
gutenberg_filter_meta_boxes
has been removed. - The PHP function
gutenberg_intercept_meta_box_render
has been removed. - The PHP function
gutenberg_override_meta_box_callback
has been removed. - The PHP function
gutenberg_show_meta_box_warning
has been removed. - The PHP function
the_gutenberg_metaboxes
has been removed. Usethe_block_editor_meta_boxes
instead. - The PHP function
gutenberg_meta_box_post_form_hidden_fields
has been removed. Usethe_block_editor_meta_box_post_form_hidden_fields
instead. - The PHP function
gutenberg_toggle_custom_fields
has been removed. - The PHP function
gutenberg_collect_meta_box_data
has been removed. Useregister_and_do_post_meta_boxes
instead. window._wpLoadGutenbergEditor
has been removed. Usewindow._wpLoadBlockEditor
instead. Note: This is a private API, not intended for public use. It may be removed in the future.- The PHP function
gutenberg_get_script_polyfill
has been removed. Usewp_get_script_polyfill
instead. - The PHP function
gutenberg_add_admin_body_class
has been removed. Use the.block-editor-page
class selector in your stylesheets if you need to scope styles to the block editor screen.
4.5.0
Dropdown.refresh()
has been deprecated as the containedPopover
is now automatically refreshed.wp.editor.PostPublishPanelToggle
has been deprecated in favor ofwp.editor.PostPublishButton
.
4.4.0
wp.date.getSettings
has been removed. Please usewp.date.__experimentalGetSettings
instead.wp.compose.remountOnPropChange
has been removed.- The following editor store actions have been removed:
createNotice
,removeNotice
,createSuccessNotice
,createInfoNotice
,createErrorNotice
,createWarningNotice
. Use the equivalent actions by the same name from the@wordpress/notices
module. - The id prop of wp.nux.DotTip has been removed. Please use the tipId prop instead.
wp.blocks.isValidBlock
has been removed. Please usewp.blocks.isValidBlockContent
instead but keep in mind that the order of params has changed.wp.data
registry.registerReducer
has been deprecated. Useregistry.registerStore
instead.wp.data
registry.registerSelectors
has been deprecated. Useregistry.registerStore
instead.wp.data
registry.registerActions
has been deprecated. Useregistry.registerStore
instead.wp.data
registry.registerResolvers
has been deprecated. Useregistry.registerStore
instead.moment
has been removed from the public API for the date module.
4.3.0
isEditorSidebarPanelOpened
selector (core/edit-post
) has been removed. Please useisEditorPanelEnabled
instead.toggleGeneralSidebarEditorPanel
action (core/edit-post
) has been removed. Please usetoggleEditorPanelOpened
instead.wp.components.PanelColor
component has been removed. Please usewp.editor.PanelColorSettings
instead.wp.editor.PanelColor
component has been removed. Please usewp.editor.PanelColorSettings
instead.
4.2.0
- Writing resolvers as async generators has been removed. Use the controls plugin instead.
wp.components.AccessibleSVG
component has been removed. Please usewp.components.SVG
instead.- The
wp.editor.UnsavedChangesWarning
component no longer accepts aforceIsDirty
prop. setActiveMetaBoxLocations
action (core/edit-post
) has been removed.initializeMetaBoxState
action (core/edit-post
) has been removed.wp.editPost.initializeEditor
no longer returns an object. Use thesetActiveMetaBoxLocations
action (core/edit-post
) in place of the existing object’sinitializeMetaBoxes
function.setMetaBoxSavedData
action (core/edit-post
) has been removed.getMetaBoxes
selector (core/edit-post
) has been removed. UsegetActiveMetaBoxLocations
selector (core/edit-post
) instead.getMetaBox
selector (core/edit-post
) has been removed. UseisMetaBoxLocationActive
selector (core/edit-post
) instead.- Attribute type coercion has been removed. Omit the source to preserve type via serialized comment demarcation.
mediaDetails
in object passed toonFileChange
callback ofwp.editor.mediaUpload
. Please usemedia_details
property instead.wp.components.CodeEditor
has been removed. Usedwp.codeEditor
directly instead.wp.blocks.setUnknownTypeHandlerName
has been removed. Please usesetFreeformContentHandlerName
andsetUnregisteredTypeHandlerName
instead.wp.blocks.getUnknownTypeHandlerName
has been removed. Please usegetFreeformContentHandlerName
andgetUnregisteredTypeHandlerName
instead.- The Reusable blocks Data API was marked as experimental as it’s subject to change in the future.
4.1.0
wp.data.dispatch( 'core/editor' ).checkTemplateValidity
has been removed. Validity is verified automatically upon block reset.
4.0.0
wp.editor.RichTextProvider
has been removed. Please usewp.data.select( 'core/editor' )
methods instead.wp.components.Draggable
as a DOM node drag handler has been removed. Please, usewp.components.Draggable
as a wrap component for your DOM node drag handler.wp.i18n.getI18n
has been removed. Use__
,_x
,_n
, or_nx
instead.wp.i18n.dcnpgettext
has been removed. Use__
,_x
,_n
, or_nx
instead.
3.9.0
- RichText
getSettings
prop has been removed. TheunstableGetSettings
prop is available if continued use is required. Unstable APIs are strongly discouraged to be used, and are subject to removal without notice. - RichText
onSetup
prop has been removed. TheunstableOnSetup
prop is available if continued use is required. Unstable APIs are strongly discouraged to be used, and are subject to removal without notice. wp.editor.getColorName
has been removed. Please usewp.editor.getColorObjectByColorValue
instead.wp.editor.getColorClass
has been renamed. Please usewp.editor.getColorClassName
instead.value
property in color objects passed bywp.editor.withColors
has been removed. Please use color property instead.- The Subheading block has been removed. Please use the Paragraph block instead.
wp.blocks.getDefaultBlockForPostFormat
has been removed.
3.8.0
wp.components.withContext
has been removed. Please usewp.element.createContext
instead. See: https://react.dev/reference/react/createContext.wp.coreBlocks.registerCoreBlocks
has been removed. Please usewp.blockLibrary.registerCoreBlocks
instead.wp.editor.DocumentTitle
component has been removed.getDocumentTitle
selector (core/editor
) has been removed.
3.7.0
wp.components.withAPIData
has been removed. Please use the Core Data module orwp.apiFetch
directly instead.wp.data.dispatch("core").receiveTerms
has been deprecated. Please usewp.data.dispatch("core").receiveEntityRecords
instead.getCategories
resolver has been deprecated. Please usegetEntityRecords
resolver instead.wp.data.select("core").getTerms
has been deprecated. Please usewp.data.select("core").getEntityRecords
instead.wp.data.select("core").getCategories
has been deprecated. Please usewp.data.select("core").getEntityRecords
instead.wp.data.select("core").isRequestingCategories
has been deprecated. Please usewp.data.select("core/data").isResolving
instead.wp.data.select("core").isRequestingTerms
has been deprecated. Please usewp.data.select("core").isResolving
instead.wp.data.restrictPersistence
,wp.data.setPersistenceStorage
andwp.data.setupPersistence
has been removed. Please use the data persistence plugin instead.
3.6.0
wp.editor.editorMediaUpload
has been removed. Please usewp.editor.mediaUpload
instead.wp.utils.getMimeTypesArray
has been removed.wp.utils.mediaUpload
has been removed. Please usewp.editor.mediaUpload
instead.wp.utils.preloadImage
has been removed.supports.wideAlign
has been removed from the Block API. Please usesupports.alignWide
instead.wp.blocks.isSharedBlock
has been removed. Usewp.blocks.isReusableBlock
instead.fetchSharedBlocks
action (core/editor
) has been removed. UsefetchReusableBlocks
instead.receiveSharedBlocks
action (core/editor
) has been removed. UsereceiveReusableBlocks
instead.saveSharedBlock
action (core/editor
) has been removed. UsesaveReusableBlock
instead.deleteSharedBlock
action (core/editor
) has been removed. UsedeleteReusableBlock
instead.updateSharedBlockTitle
action (core/editor
) has been removed. UseupdateReusableBlockTitle
instead.convertBlockToSaved
action (core/editor
) has been removed. UseconvertBlockToReusable
instead.getSharedBlock
selector (core/editor
) has been removed. UsegetReusableBlock
instead.isSavingSharedBlock
selector (core/editor
) has been removed. UseisSavingReusableBlock
instead.isFetchingSharedBlock
selector (core/editor
) has been removed. UseisFetchingReusableBlock
instead.getSharedBlocks
selector (core/editor
) has been removed. UsegetReusableBlocks
instead.
3.5.0
wp.components.ifCondition
has been removed. Please usewp.compose.ifCondition
instead.wp.components.withGlobalEvents
has been removed. Please usewp.compose.withGlobalEvents
instead.wp.components.withInstanceId
has been removed. Please usewp.compose.withInstanceId
instead.wp.components.withSafeTimeout
has been removed. Please usewp.compose.withSafeTimeout
instead.wp.components.withState
has been removed. Please usewp.compose.withState
instead.wp.element.pure
has been removed. Please usewp.compose.pure
instead.wp.element.compose
has been removed. Please usewp.compose.compose
instead.wp.element.createHigherOrderComponent
has been removed. Please usewp.compose.createHigherOrderComponent
instead.wp.utils.buildTermsTree
has been removed.wp.utils.decodeEntities
has been removed. Please usewp.htmlEntities.decodeEntities
instead.- All references to a block’s
uid
have been replaced with equivalent props and selectors forclientId
. - The
wp.editor.MediaPlaceholder
componentonSelectUrl
prop has been renamed toonSelectURL
. - The
wp.editor.UrlInput
component has been renamed towp.editor.URLInput
. - The Text Columns block has been removed. Please use the Columns block instead.
InnerBlocks
grouped layout is removed. Use intermediary nested inner blocks instead. See Columns / Column block for reference implementation.RichText
explicitelement
format removed. Please use the compatiblechildren
format instead.
3.4.0
focusOnMount
prop in thePopover
component has been changed fromBoolean
-only to an enum-style property that accepts"firstElement"
,"container"
, orfalse
. Please convert any<Popover focusOnMount />
usage to<Popover focusOnMount="firstElement" />
.wp.utils.keycodes
utilities are removed. Please usewp.keycodes
instead.- Block
id
prop inedit
function removed. Please use blockclientId
prop instead. property
source removed. Please use equivalenttext
,html
, orattribute
source, or comment attribute instead.
3.3.0
useOnce: true
has been removed from the Block API. Please usesupports.multiple: false
instead.- Serializing components using
componentWillMount
lifecycle method. Please use the constructor instead. blocks.Autocomplete.completers
filter removed. Please useeditor.Autocomplete.completers
instead.blocks.BlockEdit
filter removed. Please useeditor.BlockEdit
instead.blocks.BlockListBlock
filter removed. Please useeditor.BlockListBlock
instead.blocks.MediaUpload
filter removed. Please useeditor.MediaUpload
instead.
3.2.0
wp.data.withRehydratation
has been renamed towp.data.withRehydration
.- The
wp.editor.ImagePlaceholder
component is removed. Please usewp.editor.MediaPlaceholder
instead. wp.utils.deprecated
function removed. Please usewp.deprecated
instead.wp.utils.blob
removed. Please usewp.blob
instead.getInserterItems
: theallowedBlockTypes
argument was removed and theparentUID
argument was added.getFrecentInserterItems
selector removed. Please usegetInserterItems
instead.getSupportedBlocks
selector removed. Please usecanInsertBlockType
instead.
3.1.0
- All components in
wp.blocks.*
are removed. Please usewp.editor.*
instead. wp.blocks.withEditorSettings
is removed. Please use the data module to access the editor settingswp.data.select( "core/editor" ).getEditorSettings()
.- All DOM utils in
wp.utils.*
are removed. Please usewp.dom.*
instead. isPrivate: true
has been removed from the Block API. Please usesupports.inserter: false
instead.wp.utils.isExtraSmall
function removed. Please usewp.viewport
module instead.getEditedPostExcerpt
selector removed (core/editor
). UsegetEditedPostAttribute( 'excerpt' )
instead.
3.0.0
wp.blocks.registerCoreBlocks
function removed. Please usewp.coreBlocks.registerCoreBlocks
instead.- Raw TinyMCE event handlers for
RichText
have been deprecated. Please use documented props, ancestor event handler, or onSetup access to the internal editor instance event hub instead.
2.8.0
Original autocompleter interface in wp.components.Autocomplete
updated. Please uselatest autocompleter interface
instead. See autocomplete for more info.getInserterItems
: theallowedBlockTypes
argument is now mandatory.getFrecentInserterItems
: theallowedBlockTypes
argument is now mandatory.
2.7.0
wp.element.getWrapperDisplayName
function removed. Please usewp.element.createHigherOrderComponent
instead.
2.6.0
wp.blocks.getBlockDefaultClassname
function removed. Please usewp.blocks.getBlockDefaultClassName
instead.wp.blocks.Editable
component removed. Please use thewp.blocks.RichText
component instead.
2.5.0
- Returning raw HTML from block
save
is unsupported. Please use thewp.element.RawHTML
component instead. wp.data.query
higher-order component removed. Please usewp.data.withSelect
instead.
2.4.0
wp.blocks.BlockDescription
component removed. Please use thedescription
block property instead.wp.blocks.InspectorControls.*
components removed. Please usewp.components.*
components instead.wp.blocks.source.*
matchers removed. Please use the declarative attributes instead. See block attributes for more info.wp.data.select( 'selector', ...args )
removed. Please usewp.data.select( reducerKey' ).*
instead.wp.blocks.MediaUploadButton
component removed. Please usewp.blocks.MediaUpload
component instead.