Skip to content

Add deprecation shim for __experimentalPluginPostExcerpt #61219

@peterwilsoncc

Description

@peterwilsoncc

Description

wp.editPost.__experimentalPluginPostExcerpt was exposed as an accessible API in WordPress 6.5 and subsequently deprecated in #61188 with a no-op function.

This breaks backward compatibility for extenders using the API so the deprecation needs to be fixed to provide a shim for the recommended process for adding content to such panels.

Step-by-step reproduction instructions

POC plugin:

import { registerPlugin } from '@wordpress/plugins';
import { __experimentalPluginPostExcerpt } from '@wordpress/edit-post';

const PwccPostExcerpt = () => {
	return (
		<__experimentalPluginPostExcerpt className="pwcc-post-excerpt">
			Post Excerpt - Custom content
		</__experimentalPluginPostExcerpt>
	);
}

registerPlugin( 'pwcc-post-excerpt', { render: PwccPostExcerpt } );
  1. Create and build the POC plugin above.
  2. Checkout 4abdb39 or earlier
  3. Create a new post and open the excerpt panel
  4. At the bottom of the panel the text "Post Excerpt - Custom content" will display
  5. Checkout trunk
  6. Create a new post and open the excerpt panel
  7. The plugin's text will no longer be displayed

Screenshots, screen recording, code snippet

WordPress trunk

Screen Shot 2024-04-30 at 9 10 11 am

Gutenberg 4abdb39

Screen Shot 2024-04-30 at 8 46 06 am

Gutenberg trunk

Screen Shot 2024-04-30 at 8 44 57 am

Environment info

  • WordPress/WordPress master at 9a2a3dc5b3ed97ae7a894b65576227b033ec0e86
  • Gutenberg trunk at 5b154e5

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

Backwards CompatibilityIssues or PRs that impact backwards compatability[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions