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

Framework: Deprecate gutenberg_get_post_from_context #21662

Closed
aduth opened this issue Apr 16, 2020 · 0 comments · Fixed by #21696
Closed

Framework: Deprecate gutenberg_get_post_from_context #21662

aduth opened this issue Apr 16, 2020 · 0 comments · Fixed by #21696
Assignees
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability Framework Issues related to broader framework topics, especially as it relates to javascript Good First Issue An issue that's suitable for someone looking to contribute for the first time [Status] In Progress Tracking issues with work in progress [Type] Code Quality Issues or PRs that relate to code quality

Comments

@aduth
Copy link
Member

aduth commented Apr 16, 2020

Previously: #21467 (#21467 (comment))

Context:

#21467 adds first-class support for block context, which by default includes support for providing the post ID to any block which defines an intent to consume this context value.

This had previously been achieved by the implementation of a gutenberg_get_post_from_context function.

Task:

  1. Replace existing occurrences of gutenberg_get_post_from_context to use block context
    • See Post Title block implementation for prior art
  2. Add _deprecated_function function call in gutenberg_get_post_from_context.
  3. Add entry to deprecations.md for two versions in the future of when the deprecation is added.
  4. (Optional) Move gutenberg_get_post_from_context to a more appropriate file. compat.php is intended to be reserved for functions with a corresponding WordPress proposal ticket proposing the addition of a function.
  5. (Future) Remove the function after the deprecation period has elapsed
@aduth aduth added Framework Issues related to broader framework topics, especially as it relates to javascript Good First Issue An issue that's suitable for someone looking to contribute for the first time Backwards Compatibility Issues or PRs that impact backwards compatability [Type] Code Quality Issues or PRs that relate to code quality labels Apr 16, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability Framework Issues related to broader framework topics, especially as it relates to javascript Good First Issue An issue that's suitable for someone looking to contribute for the first time [Status] In Progress Tracking issues with work in progress [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant