Skip to content

Commit

Permalink
deprecate in the .js file
Browse files Browse the repository at this point in the history
  • Loading branch information
retrofox committed Apr 29, 2024
1 parent f24b2e9 commit d1d4a7f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
17 changes: 17 additions & 0 deletions packages/edit-post/src/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import {
} from '@wordpress/editor';
import deprecated from '@wordpress/deprecated';

/**
* Internal dependencies
*/
import { PluginPostExcerpt } from '.';

const deprecateSlot = ( name ) => {
deprecated( `wp.editPost.${ name }`, {
since: '6.6',
Expand Down Expand Up @@ -84,4 +89,16 @@ 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',
alternative: 'wp.editPost.PluginPostExcerpt',
} );
return PluginPostExcerpt;
}

/* eslint-enable jsdoc/require-param */
8 changes: 0 additions & 8 deletions packages/edit-post/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,5 @@ export { default as __experimentalMainDashboardButton } from './components/heade

export { PluginPostExcerpt };

export function __experimentalPluginPostExcerpt() {
deprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {
since: '6.6',
alternative: 'wp.editPost.PluginPostExcerpt',
} );
return PluginPostExcerpt;
}

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

0 comments on commit d1d4a7f

Please sign in to comment.