-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Footnotes not detected on CPTs registered by plugins (in WordPress 6.5 wp-dev PR) #58341
Comments
I've created WordPress/wordpress-develop#6043 for making the footnotes feature opt-in. Currently all WordPress has never added a new post type feature that is opt-out. as doing so requires developers run I haven't created a GB version of the PR as I wanted to make sure the WordPress-Develop PR didn't hit the order of operations issue above when runninng the plugin. |
I agree with @peterwilsoncc. Supports should continue to be opt-in, not opt-out. In other words, what is configured in a post type's |
As far as I know this has been addressed already. can you confirm? Also removing this from 6.5 as today is RC1. |
Yes, that's correct. The meta is now registered at I'm closing this as completed should it be moved to the done column on the board? Edit: Heh, I guess the bot answered my question. Thanks bot, no AI needed :) |
Description
The
register_block_core_footnotes
is currently hooked on theinit
action to run at the default priority of 10.init
action at priority 11 or higherinit
priority asregister_block_core_footnotes()
runs before the action registered by the plugins.When two actions are registered at the same priority, WordPress runs the actions in the order in which they are registered as each subsequent action is appended to the array.
In the released version of WordPress, the blocks are registered prior to plugins so the relevant portion of the
WP_Hook
instance is:Note
This portion of the bug may be suppressed when running the Gutenberg plugin due to the hook being registered by a plugin. Please check out WordPress/wordpress-develop#5922 to test the second part of this issue.
Suggested resolution
Run the
register_block_core_footnotes
later on theinit
action, I suggest at a priority of about 100 but that's pretty much a random number.To maintain backward compatibility for plugins deactivating the footnotes block by running
remove_action( 'init', 'register_block_core_footnotes' );
some juggling will be required.Follow up to #57353.
cc @youknowriad @ellatrix @jorgefilipecosta
Step-by-step reproduction instructions
The same result will occur for
Late CPT Supporting Footnotes
Screenshots, screen recording, code snippet
Plugin for testing
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: