Skip to content

Commit

Permalink
editPost: deprecate __experimentalPluginPostExcerpt (#61188)
Browse files Browse the repository at this point in the history
Co-authored-by: retrofox <retrofox@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: pdewouters <pauldewouters@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
  • Loading branch information
6 people committed Apr 29, 2024
1 parent 4abdb39 commit b75dd7b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
13 changes: 13 additions & 0 deletions packages/edit-post/src/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,17 @@ export function PluginSidebarMoreMenuItem( props ) {
deprecateSlot( 'PluginSidebarMoreMenuItem' );
return <EditorPluginSidebarMoreMenuItem { ...props } />;
}

/**
* @see PluginPostExcerpt in @wordpress/editor package.
*/
export function __experimentalPluginPostExcerpt() {
deprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {
since: '6.6',
hint: 'Core and custom panels can be access programmatically using their panel name.',
link: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',
} );
return null;
}

/* eslint-enable jsdoc/require-param */
11 changes: 2 additions & 9 deletions packages/edit-post/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,13 @@ import {
registerLegacyWidgetBlock,
registerWidgetGroupBlock,
} from '@wordpress/widgets';
import {
privateApis as editorPrivateApis,
store as editorStore,
} from '@wordpress/editor';
import { store as editorStore } from '@wordpress/editor';

/**
* Internal dependencies
*/
import './hooks';
import Editor from './editor';
import { unlock } from './lock-unlock';

const { PluginPostExcerpt: __experimentalPluginPostExcerpt } =
unlock( editorPrivateApis );

/**
* Initializes and returns an instance of Editor.
Expand Down Expand Up @@ -161,6 +154,6 @@ export function reinitializeEditor() {

export { default as __experimentalFullscreenModeClose } from './components/header/fullscreen-mode-close';
export { default as __experimentalMainDashboardButton } from './components/header/main-dashboard-button';
export { __experimentalPluginPostExcerpt };

export { store } from './store';
export * from './deprecated';

0 comments on commit b75dd7b

Please sign in to comment.