Skip to content

Use hookable-patterns with existing blocks & DOCS#949

Merged
mauteri merged 3 commits intoGatherPress:developfrom
carstingaxion:feature/use-block-hooks-api
Oct 15, 2024
Merged

Use hookable-patterns with existing blocks & DOCS#949
mauteri merged 3 commits intoGatherPress:developfrom
carstingaxion:feature/use-block-hooks-api

Conversation

@carstingaxion
Copy link
Copy Markdown
Collaborator

@carstingaxion carstingaxion commented Oct 14, 2024

After the introduction of hookable block-patterns with #888, this PR updates the post type registration to make use of the new patterns.

All blocks that were previously added to the template array, are now added using the Block Hooks API. This brings a lot of flexibility, which is minimal covered in an updated developer doc.

Description of the Change

Closes # Follow-up for: #888 (#628)

How to test the Change

I provided three examples in the updated /docs/developer/blocks/hookable-patterns, which can be used to test.

Changelog Entry

Changed - Use hookable-patterns with the existing blocks & update documentation

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@carstingaxion carstingaxion requested a review from mauteri October 14, 2024 00:28
@carstingaxion carstingaxion mentioned this pull request Oct 14, 2024
1 task
@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#949 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri mauteri merged commit df8f92b into GatherPress:develop Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants