Skip to content
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

Merged

Conversation

georgestephanis
Copy link
Contributor

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

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.
Copy link

github-actions bot commented Mar 13, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: georgestephanis <georgestephanis@git.wordpress.org>
Co-authored-by: c4rl0sbr4v0 <cbravobernal@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 13, 2024
Copy link

👋 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.

@cbravobernal cbravobernal added [Type] Bug An existing feature does not function as intended [Packages] Interactivity /packages/interactivity labels Mar 13, 2024
georgestephanis and others added 2 commits March 14, 2024 09:29
Co-Authored-By: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com>
Co-Authored-By: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com>
Copy link
Contributor

@cbravobernal cbravobernal left a 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!

@cbravobernal cbravobernal enabled auto-merge (squash) March 14, 2024 13:44
@cbravobernal cbravobernal merged commit 6d1de9c into WordPress:trunk Mar 14, 2024
58 of 61 checks passed
@github-actions github-actions bot added this to the Gutenberg 18.0 milestone Mar 14, 2024
@bph bph added the [Feature] Interactivity API API to add frontend interactivity to blocks. label Mar 21, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Mar 27, 2024
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Packages] Interactivity /packages/interactivity [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants