Conversation
|
Maybe worth mentioning in a separate issue; but do we also want to keep the gutenberg_ prefix at the beginning of the functions? |
|
All of those should be removed with the build for core. |
|
Edit: disregard my comment, as this only applies to
gutenberg/tools/webpack/blocks.js Lines 123 to 129 in 80e3447 |
| function gutenberg_get_global_settings( $path = array(), $block_name = '', $origin = 'all' ) { | ||
| if ( '' !== $block_name ) { | ||
| $path = array_merge( array( 'blocks', $block_name ), $path ); | ||
| function gutenberg_get_global_settings( $path = array(), $context = array() ) { |
There was a problem hiding this comment.
Do we want function_exists checks for core?
There was a problem hiding this comment.
We don't need them as the current naming stands, but I discussed this with Miguel and I'm going to check how do we want this public API to operate (see). I'll post as a comment any follow-up PR.
|
Per our private conversation, this PR looks good in terms of API changes. As for the naming of the function so as to operate across plugin and core, that's another question. The two main opposing methods are:
|
|
I've leveled up my understanding of how |
|
The second follow-up I thought we need is introducing short-circuit filters to be able to add new behavior from the plugin #36909 |
|
We decided against the filters. Rationale at #36909 (comment) |
This simplifies the public API of the newly introduced methods in WordPress 5.9. It's based on feedback received as per #36556 and future improvements (such as having multiple theme.json files).
How to test