Skip to content

Commit

Permalink
Docs: Clarify the non contextual post types (WordPress#58836)
Browse files Browse the repository at this point in the history
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: draganescu <[email protected]>
  • Loading branch information
3 people authored Feb 8, 2024
1 parent 265a57f commit 9be05e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
const { PatternsMenuItems } = unlock( editPatternsPrivateApis );

const noop = () => {};

/**
* These are global entities that are only there to split blocks into logical units
* They don't provide a "context" for the current post/page being rendered.
* So we should not use their ids as post context. This is important to allow post blocks
* (post content, post title) to be used within them without issues.
*/
const NON_CONTEXTUAL_POST_TYPES = [
'wp_block',
'wp_template',
Expand Down

0 comments on commit 9be05e3

Please sign in to comment.