Allow PHP-Only Block Registration#10932
Conversation
6b3535e to
7d228d9
Compare
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
ec4f677 to
6a7c802
Compare
6a7c802 to
691cdf5
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Co-authored-by: Weston Ruter <westonruter@gmail.com>
src/wp-includes/default-filters.php
Outdated
There was a problem hiding this comment.
The initial approach was to collect the blocks that should be registered and expose them as editor settings in the get_block_editor_settings() function. Now, based on this feedback, I output them as JS inline variables via a new action hook.
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
|
@oandregal, Based on your suggestion, I've added server-side type checking in 658b7af. I'd be happy to see if this is what you wanted. |
|
@t-hamano thank you, that's great :) Code changes look good. |
|
@oandregal Thanks for the review! After committing this PR to core, I would like to backport similar changes to Gutenberg. |
Co-authored-by: Miguel Fonseca <150562+mcsf@users.noreply.github.com>
Trac ticket: https://core.trac.wordpress.org/ticket/64639
Use of AI Tools
I am using the Cursor editor and the AI model is auto-selected. I have reviewed all the code myself.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.