๐Ÿ’Ž PREMIUM: WordPress/gutenberg/pull/ - High Quality

Skip to content

Conversation

@nefeline

What?

Ensures the postId from the block context is used for fetching the post excerpt.

Why?

Similar to this change made to the Post Title block, here we can ensure that independent of where the Post Excerpt block is added, the rendered content will be aligned with the context of the block itself rather than the global post.

For context, this limitation surfaced while working on the new Single Product Block on WooCommerce blocks, where the displayed excerpt would match the current post rather than the block context while at the same time, the Post Title block would respect the block context accordingly.

Testing Instructions

  1. Add the Post Excerpt block to any post/page.
  2. Confirm that the excerpt is properly rendered both on the editor and on the front-end sides.

@nefeline nefeline requested a review from ajitbohra as a code owner March 30, 2023 20:24
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 30, 2023
@github-actions