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.isValidBlockContenthas been removed. Please usewp.blocks.validateBlockinstead.
11.0.0
wp.blocks.registerBlockTypeFromMetadatamethod has been removed. Usewp.blocks.registerBlockTypemethod instead.
10.3.0
- Passing a tuple of components with
asprop toActionItem.Slotcomponent is no longer supported. Please pass a component withasprop instead. Example:
“`diff
<ActionItem.Slot
name=”my/slot”
label={ __( ‘My slot’ ) }- as={ [ MenuGroup, MenuItem ] }
- as={ MenuGroup }
/>
“`
9.7.0
leftSidebarprop inInterfaceSkeletoncomponent has been removed. UsesecondarySidebarprop instead.
8.6.0
- Block API integration with Block Context was updated. When registering a block use
usesContextandprovidesContextpair in JavaScript files anduses_contextandprovides_contextpair in PHP files instead of previous paircontextandprovidesContext.
8.3.0
- The PHP function
gutenberg_get_post_from_contexthas been removed. Use Block Context instead. - The old Block Pattern APIs
register_pattern/unregister_patternhave been removed. Use the new functions instead.
5.5.0
- The PHP function
gutenberg_inithas been removed. - The PHP function
is_gutenberg_pagehas been removed. UseWP_Screen::is_block_editorinstead. - The PHP function
the_gutenberg_projecthas been removed. - The PHP function
gutenberg_default_post_format_templatehas been removed. - The PHP function
gutenberg_get_available_image_sizeshas been removed. - The PHP function
gutenberg_get_autosave_newer_than_post_savehas been removed. - The PHP function
gutenberg_editor_scripts_and_styleshas been removed.
5.4.0
- The PHP function
gutenberg_load_plugin_textdomainhas been removed. - The PHP function
gutenberg_get_jed_locale_datahas been removed. - The PHP function
gutenberg_load_locale_datahas been removed.
5.3.0
- The PHP function
gutenberg_redirect_to_classic_editor_when_saving_postshas been removed. - The PHP function
gutenberg_revisions_link_to_editorhas been removed. - The PHP function
gutenberg_remember_classic_editor_when_saving_postshas been removed. - The PHP function
gutenberg_can_edit_post_typehas been removed. Useuse_block_editor_for_post_typeinstead. - The PHP function
gutenberg_can_edit_posthas been removed. Useuse_block_editor_for_postinstead.
5.2.0
- The PHP function
gutenberg_parse_blockshas been removed. Useparse_blocksinstead. - The PHP function
get_dynamic_blocks_regexhas been removed. - The PHP function
gutenberg_render_blockhas been removed. Userender_blockinstead. - The PHP function
strip_dynamic_blockshas been removed. For use in excerpt preparation, considerexcerpt_remove_blocksinstead. - The PHP function
strip_dynamic_blocks_add_filterhas been removed. - The PHP function
strip_dynamic_blocks_remove_filterhas been removed. - The PHP function
gutenberg_post_has_blockshas been removed. Usehas_blocksinstead. - The PHP function
gutenberg_content_has_blockshas been removed. Usehas_blocksinstead. - The PHP function
gutenberg_register_rest_routeshas been removed. - The PHP function
gutenberg_add_taxonomy_visibility_fieldhas been removed. - The PHP function
gutenberg_get_taxonomy_visibility_datahas been removed. - The PHP function
gutenberg_add_permalink_template_to_postshas been removed. - The PHP function
gutenberg_add_block_format_to_post_contenthas been removed. - The PHP function
gutenberg_add_target_schema_to_linkshas been removed. - The PHP function
gutenberg_register_post_prepare_functionshas been removed. - The PHP function
gutenberg_silence_rest_errorshas been removed. - The PHP function
gutenberg_filter_post_type_labelshas been removed. - The PHP function
gutenberg_preload_api_requesthas been removed. Userest_preload_api_requestinstead. - The PHP function
gutenberg_remove_wpcom_markdown_supporthas been removed. - The PHP function
gutenberg_add_gutenberg_post_statehas been removed. - The PHP function
gutenberg_bulk_post_updated_messageshas been removed. - The PHP function
gutenberg_kses_allowedtagshas been removed. - The PHP function
gutenberg_add_responsive_body_classhas been removed. - The PHP function
gutenberg_add_edit_link_filtershas been removed. - The PHP function
gutenberg_add_edit_linkhas been removed. - The PHP function
gutenberg_block_bulk_actionshas been removed. - The PHP function
gutenberg_replace_default_add_new_buttonhas been removed. - The PHP function
gutenberg_content_block_versionhas been removed. Useblock_versioninstead. - The PHP function
gutenberg_get_block_categorieshas been removed. Useget_block_categoriesinstead. - The PHP function
register_tinymce_scriptshas been removed. Usewp_register_tinymce_scriptsinstead. - The PHP function
gutenberg_register_post_typeshas been removed. - The
gutenbergtheme support option has been removed. Usealign-wideinstead. - The PHP function
gutenberg_prepare_blocks_for_jshas been removed. Useget_block_editor_server_block_settingsinstead. - The PHP function
gutenberg_load_list_reusable_blockshas been removed. - The PHP function
_gutenberg_utf8_splithas been removed. Use_mb_substrinstead. - The PHP function
gutenberg_disable_editor_settings_wpautophas been removed. - The PHP function
gutenberg_add_rest_nonce_to_heartbeat_response_headershas been removed. - The PHP function
gutenberg_check_if_classic_needs_warning_about_blockshas been removed. - The PHP function
gutenberg_warn_classic_about_blockshas been removed. - The PHP function
gutenberg_show_privacy_policy_help_texthas been removed. - The PHP function
gutenberg_common_scripts_and_styleshas been removed. Usewp_common_block_scripts_and_stylesinstead. - The PHP function
gutenberg_enqueue_registered_block_scripts_and_styleshas been removed. Usewp_enqueue_registered_block_scripts_and_stylesinstead. - The PHP function
gutenberg_meta_box_savehas been removed. - The PHP function
gutenberg_meta_box_save_redirecthas been removed. - The PHP function
gutenberg_filter_meta_boxeshas been removed. - The PHP function
gutenberg_intercept_meta_box_renderhas been removed. - The PHP function
gutenberg_override_meta_box_callbackhas been removed. - The PHP function
gutenberg_show_meta_box_warninghas been removed. - The PHP function
the_gutenberg_metaboxeshas been removed. Usethe_block_editor_meta_boxesinstead. - The PHP function
gutenberg_meta_box_post_form_hidden_fieldshas been removed. Usethe_block_editor_meta_box_post_form_hidden_fieldsinstead. - The PHP function
gutenberg_toggle_custom_fieldshas been removed. - The PHP function
gutenberg_collect_meta_box_datahas been removed. Useregister_and_do_post_meta_boxesinstead. window._wpLoadGutenbergEditorhas been removed. Usewindow._wpLoadBlockEditorinstead. Note: This is a private API, not intended for public use. It may be removed in the future.- The PHP function
gutenberg_get_script_polyfillhas been removed. Usewp_get_script_polyfillinstead. - The PHP function
gutenberg_add_admin_body_classhas been removed. Use the.block-editor-pageclass 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 containedPopoveris now automatically refreshed.wp.editor.PostPublishPanelTogglehas been deprecated in favor ofwp.editor.PostPublishButton.
4.4.0
wp.date.getSettingshas been removed. Please usewp.date.__experimentalGetSettingsinstead.wp.compose.remountOnPropChangehas 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/noticesmodule. - The id prop of wp.nux.DotTip has been removed. Please use the tipId prop instead.
wp.blocks.isValidBlockhas been removed. Please usewp.blocks.isValidBlockContentinstead but keep in mind that the order of params has changed.wp.dataregistry.registerReducerhas been deprecated. Useregistry.registerStoreinstead.wp.dataregistry.registerSelectorshas been deprecated. Useregistry.registerStoreinstead.wp.dataregistry.registerActionshas been deprecated. Useregistry.registerStoreinstead.wp.dataregistry.registerResolvershas been deprecated. Useregistry.registerStoreinstead.momenthas been removed from the public API for the date module.
4.3.0
isEditorSidebarPanelOpenedselector (core/edit-post) has been removed. Please useisEditorPanelEnabledinstead.toggleGeneralSidebarEditorPanelaction (core/edit-post) has been removed. Please usetoggleEditorPanelOpenedinstead.wp.components.PanelColorcomponent has been removed. Please usewp.editor.PanelColorSettingsinstead.wp.editor.PanelColorcomponent has been removed. Please usewp.editor.PanelColorSettingsinstead.
4.2.0
- Writing resolvers as async generators has been removed. Use the controls plugin instead.
wp.components.AccessibleSVGcomponent has been removed. Please usewp.components.SVGinstead.- The
wp.editor.UnsavedChangesWarningcomponent no longer accepts aforceIsDirtyprop. setActiveMetaBoxLocationsaction (core/edit-post) has been removed.initializeMetaBoxStateaction (core/edit-post) has been removed.wp.editPost.initializeEditorno longer returns an object. Use thesetActiveMetaBoxLocationsaction (core/edit-post) in place of the existing object’sinitializeMetaBoxesfunction.setMetaBoxSavedDataaction (core/edit-post) has been removed.getMetaBoxesselector (core/edit-post) has been removed. UsegetActiveMetaBoxLocationsselector (core/edit-post) instead.getMetaBoxselector (core/edit-post) has been removed. UseisMetaBoxLocationActiveselector (core/edit-post) instead.- Attribute type coercion has been removed. Omit the source to preserve type via serialized comment demarcation.
mediaDetailsin object passed toonFileChangecallback ofwp.editor.mediaUpload. Please usemedia_detailsproperty instead.wp.components.CodeEditorhas been removed. Usedwp.codeEditordirectly instead.wp.blocks.setUnknownTypeHandlerNamehas been removed. Please usesetFreeformContentHandlerNameandsetUnregisteredTypeHandlerNameinstead.wp.blocks.getUnknownTypeHandlerNamehas been removed. Please usegetFreeformContentHandlerNameandgetUnregisteredTypeHandlerNameinstead.- 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' ).checkTemplateValidityhas been removed. Validity is verified automatically upon block reset.
4.0.0
wp.editor.RichTextProviderhas been removed. Please usewp.data.select( 'core/editor' )methods instead.wp.components.Draggableas a DOM node drag handler has been removed. Please, usewp.components.Draggableas a wrap component for your DOM node drag handler.wp.i18n.getI18nhas been removed. Use__,_x,_n, or_nxinstead.wp.i18n.dcnpgettexthas been removed. Use__,_x,_n, or_nxinstead.
3.9.0
- RichText
getSettingsprop has been removed. TheunstableGetSettingsprop is available if continued use is required. Unstable APIs are strongly discouraged to be used, and are subject to removal without notice. - RichText
onSetupprop has been removed. TheunstableOnSetupprop is available if continued use is required. Unstable APIs are strongly discouraged to be used, and are subject to removal without notice. wp.editor.getColorNamehas been removed. Please usewp.editor.getColorObjectByColorValueinstead.wp.editor.getColorClasshas been renamed. Please usewp.editor.getColorClassNameinstead.valueproperty in color objects passed bywp.editor.withColorshas been removed. Please use color property instead.- The Subheading block has been removed. Please use the Paragraph block instead.
wp.blocks.getDefaultBlockForPostFormathas been removed.
3.8.0
wp.components.withContexthas been removed. Please usewp.element.createContextinstead. See: https://react.dev/reference/react/createContext.wp.coreBlocks.registerCoreBlockshas been removed. Please usewp.blockLibrary.registerCoreBlocksinstead.wp.editor.DocumentTitlecomponent has been removed.getDocumentTitleselector (core/editor) has been removed.
3.7.0
wp.components.withAPIDatahas been removed. Please use the Core Data module orwp.apiFetchdirectly instead.wp.data.dispatch("core").receiveTermshas been deprecated. Please usewp.data.dispatch("core").receiveEntityRecordsinstead.getCategoriesresolver has been deprecated. Please usegetEntityRecordsresolver instead.wp.data.select("core").getTermshas been deprecated. Please usewp.data.select("core").getEntityRecordsinstead.wp.data.select("core").getCategorieshas been deprecated. Please usewp.data.select("core").getEntityRecordsinstead.wp.data.select("core").isRequestingCategorieshas been deprecated. Please usewp.data.select("core/data").isResolvinginstead.wp.data.select("core").isRequestingTermshas been deprecated. Please usewp.data.select("core").isResolvinginstead.wp.data.restrictPersistence,wp.data.setPersistenceStorageandwp.data.setupPersistencehas been removed. Please use the data persistence plugin instead.
3.6.0
wp.editor.editorMediaUploadhas been removed. Please usewp.editor.mediaUploadinstead.wp.utils.getMimeTypesArrayhas been removed.wp.utils.mediaUploadhas been removed. Please usewp.editor.mediaUploadinstead.wp.utils.preloadImagehas been removed.supports.wideAlignhas been removed from the Block API. Please usesupports.alignWideinstead.wp.blocks.isSharedBlockhas been removed. Usewp.blocks.isReusableBlockinstead.fetchSharedBlocksaction (core/editor) has been removed. UsefetchReusableBlocksinstead.receiveSharedBlocksaction (core/editor) has been removed. UsereceiveReusableBlocksinstead.saveSharedBlockaction (core/editor) has been removed. UsesaveReusableBlockinstead.deleteSharedBlockaction (core/editor) has been removed. UsedeleteReusableBlockinstead.updateSharedBlockTitleaction (core/editor) has been removed. UseupdateReusableBlockTitleinstead.convertBlockToSavedaction (core/editor) has been removed. UseconvertBlockToReusableinstead.getSharedBlockselector (core/editor) has been removed. UsegetReusableBlockinstead.isSavingSharedBlockselector (core/editor) has been removed. UseisSavingReusableBlockinstead.isFetchingSharedBlockselector (core/editor) has been removed. UseisFetchingReusableBlockinstead.getSharedBlocksselector (core/editor) has been removed. UsegetReusableBlocksinstead.
3.5.0
wp.components.ifConditionhas been removed. Please usewp.compose.ifConditioninstead.wp.components.withGlobalEventshas been removed. Please usewp.compose.withGlobalEventsinstead.wp.components.withInstanceIdhas been removed. Please usewp.compose.withInstanceIdinstead.wp.components.withSafeTimeouthas been removed. Please usewp.compose.withSafeTimeoutinstead.wp.components.withStatehas been removed. Please usewp.compose.withStateinstead.wp.element.purehas been removed. Please usewp.compose.pureinstead.wp.element.composehas been removed. Please usewp.compose.composeinstead.wp.element.createHigherOrderComponenthas been removed. Please usewp.compose.createHigherOrderComponentinstead.wp.utils.buildTermsTreehas been removed.wp.utils.decodeEntitieshas been removed. Please usewp.htmlEntities.decodeEntitiesinstead.- All references to a block’s
uidhave been replaced with equivalent props and selectors forclientId. - The
wp.editor.MediaPlaceholdercomponentonSelectUrlprop has been renamed toonSelectURL. - The
wp.editor.UrlInputcomponent has been renamed towp.editor.URLInput. - The Text Columns block has been removed. Please use the Columns block instead.
InnerBlocksgrouped layout is removed. Use intermediary nested inner blocks instead. See Columns / Column block for reference implementation.RichTextexplicitelementformat removed. Please use the compatiblechildrenformat instead.
3.4.0
focusOnMountprop in thePopovercomponent 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.keycodesutilities are removed. Please usewp.keycodesinstead.- Block
idprop ineditfunction removed. Please use blockclientIdprop instead. propertysource removed. Please use equivalenttext,html, orattributesource, or comment attribute instead.
3.3.0
useOnce: truehas been removed from the Block API. Please usesupports.multiple: falseinstead.- Serializing components using
componentWillMountlifecycle method. Please use the constructor instead. blocks.Autocomplete.completersfilter removed. Please useeditor.Autocomplete.completersinstead.blocks.BlockEditfilter removed. Please useeditor.BlockEditinstead.blocks.BlockListBlockfilter removed. Please useeditor.BlockListBlockinstead.blocks.MediaUploadfilter removed. Please useeditor.MediaUploadinstead.
3.2.0
wp.data.withRehydratationhas been renamed towp.data.withRehydration.- The
wp.editor.ImagePlaceholdercomponent is removed. Please usewp.editor.MediaPlaceholderinstead. wp.utils.deprecatedfunction removed. Please usewp.deprecatedinstead.wp.utils.blobremoved. Please usewp.blobinstead.getInserterItems: theallowedBlockTypesargument was removed and theparentUIDargument was added.getFrecentInserterItemsselector removed. Please usegetInserterItemsinstead.getSupportedBlocksselector removed. Please usecanInsertBlockTypeinstead.
3.1.0
- All components in
wp.blocks.*are removed. Please usewp.editor.*instead. wp.blocks.withEditorSettingsis 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: truehas been removed from the Block API. Please usesupports.inserter: falseinstead.wp.utils.isExtraSmallfunction removed. Please usewp.viewportmodule instead.getEditedPostExcerptselector removed (core/editor). UsegetEditedPostAttribute( 'excerpt' )instead.
3.0.0
wp.blocks.registerCoreBlocksfunction removed. Please usewp.coreBlocks.registerCoreBlocksinstead.- Raw TinyMCE event handlers for
RichTexthave 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.Autocompleteupdated. Please uselatest autocompleter interfaceinstead. See autocomplete for more info.getInserterItems: theallowedBlockTypesargument is now mandatory.getFrecentInserterItems: theallowedBlockTypesargument is now mandatory.
2.7.0
wp.element.getWrapperDisplayNamefunction removed. Please usewp.element.createHigherOrderComponentinstead.
2.6.0
wp.blocks.getBlockDefaultClassnamefunction removed. Please usewp.blocks.getBlockDefaultClassNameinstead.wp.blocks.Editablecomponent removed. Please use thewp.blocks.RichTextcomponent instead.
2.5.0
- Returning raw HTML from block
saveis unsupported. Please use thewp.element.RawHTMLcomponent instead. wp.data.queryhigher-order component removed. Please usewp.data.withSelectinstead.
2.4.0
wp.blocks.BlockDescriptioncomponent removed. Please use thedescriptionblock 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.MediaUploadButtoncomponent removed. Please usewp.blocks.MediaUploadcomponent instead.