-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functions prefixed with `gutenberg_´ in WP6.3 beta 2. #52103
Comments
It appears that both these functions are Gutenberg-only, experimental functionality (for the interactivity API) that are wrapped in the following condition:
It means they'll only run when the plugin is installed and active. Should we removex everything wrapped in the If I were strapped to a rocket and given 2 seconds to decide the fate of this code, I'd probably lean towards removing it. Only because a JS equivalent exists, which is used at build time If folks think this is the right way to go I can prep a PR for the |
Anything wrapped in It might be good to update the |
Never mind. Brain meltdown, sorry. I agree we could rename the functions 😄 It's not quite the same as in #51989, however, which only renamed to an existing core function. Here we are introducing two new, currently experimental, functions. |
If it's Gutenberg specific code, why put in WordPress core? |
The blocks code is built automatically in WP core folder structure. There are some features/code that needs to be part of the php blocks' code, but we don't want it to be part of WP core. My understanding is that is the approach to handle such cases as @tellthemachines also notes. |
These functions have been removed in Gutenberg trunk in 9b8d5c1#diff-adf84f1d0ae56974f4c9f23d5d07d3e1fe9f3bda38d4bd2d8ba13ba41d9f0e70 already They still exist in Core trunk, e.g., here |
I'm confused as to the state of this issue 😅. Is there more needed for 6.3? It seems like not based on the various discussions across this issue and #51077 but I wanted to be sure! |
I think the decision was to leave them to preserve consistency with block PHP files. They don't run in Core, only in the plugin. Block PHP files are not manually backported, but are synced via the package updates. Since they are pulled in "as-is", there is therefore no opportunity to "massage" them into the Core code base. Any name change would need to occur in the plugin. So At least that's the way I've understood the feedback. I get the impression it's okay to close this off since folks seem fine with that. |
Closing for now because:
|
Description
With WordPress 6.3 beta 2, two function were included that are prefixed with
gutenberg_
. They are:gutenberg_block_core_navigation_update_interactive_view_script
andgutenberg_block_core_file_update_interactive_view_script
. Their name shoul be updated to not use that prefix.Step-by-step reproduction instructions
See WordPress beta 2 source code.
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: