Skip to content

Allow block context passage in post template - #85395

Open
Vedant-Gandhi wants to merge 3 commits into
WordPress:trunkfrom
Vedant-Gandhi:fix/post-template-context
Open

Vedant-Gandhi wants to merge 3 commits into
WordPress:trunkfrom
Vedant-Gandhi:fix/post-template-context

Conversation

@Vedant-Gandhi

Copy link
Copy Markdown
Contributor

What?

Pass the block context down in Post Template.

Why?

#68608

How?

Pass the $block->context to WP_Block in Post Template

Testing Instructions

  1. Setup the testing environment.
  2. Run npm run test:unit:php:base -- --filter Tests_Blocks_RenderPostTemplateBlock

Use of AI Tools

I have used Claude Sonnet 5.5 or reviewed the issue as well as using it as an assistant to write the code. It has also been used to write comments in the code as well as review the test cases and update them as needed. I have thoroughly reviewed the code and ensured it does not introduce any side effects on other components apart from the fix being introduced.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Vedant-Gandhi <vedantgandhi28@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

🏷️ Labels

This pull request needs exactly one label indicating its type, and has 0.

  • Required: any label starting with [Type].
  • Found: none.

Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block library /packages/block-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant