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
Re-introduce data_wp_context()
with _deprecated_function()
call
#59834
Re-introduce data_wp_context()
with _deprecated_function()
call
#59834
Conversation
Following its removal in WordPress#59465 and release in Gutenberg 17.9, this can potentially result in fatal errors on sites where plugins or themes are calling `data_wp_context()` instead of the newer function name. This should backfill it in, and provide a reminder to update to the newer function.
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @georgestephanis! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
lib/compat/wordpress-6.5/interactivity-api/interactivity-api.php
Outdated
Show resolved
Hide resolved
Co-Authored-By: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com>
Co-Authored-By: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR!
…ordPress#59834) * Re-introduce `data_wp_context()` with `_deprecated_function()` call Following its removal in WordPress#59465 and release in Gutenberg 17.9, this can potentially result in fatal errors on sites where plugins or themes are calling `data_wp_context()` instead of the newer function name. This should backfill it in, and provide a reminder to update to the newer function. * Typo'd version number. * Adding deprecated to phpdoc. --------- Co-authored-by: georgestephanis <georgestephanis@git.wordpress.org> Co-authored-by: c4rl0sbr4v0 <cbravobernal@git.wordpress.org>
What?
Following its removal in #59465 and release in Gutenberg 17.9, this can potentially result in fatal errors on sites where plugins or themes are calling
data_wp_context()
instead of the newer function name.This should backfill it in, and provide a reminder to update to the newer function.
Why?
Avoids fatal errors where third-party code was using the old function name.
How?
Mapping the old function to the new function with a
_deprecated_function()
invocation to remind the user.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast