-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Framework: Deprecate gutenberg_get_post_from_context #21662
Copy link
Copy link
Closed
Labels
Backwards CompatibilityIssues or PRs that impact backwards compatabilityIssues or PRs that impact backwards compatabilityFrameworkIssues related to broader framework topics, especially as it relates to javascriptIssues related to broader framework topics, especially as it relates to javascriptGood First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality
Description
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:
- Replace existing occurrences of
gutenberg_get_post_from_contextto use block context- See Post Title block implementation for prior art
- Add
_deprecated_functionfunction call ingutenberg_get_post_from_context. - Add entry to deprecations.md for two versions in the future of when the deprecation is added.
- (Optional) Move
gutenberg_get_post_from_contextto a more appropriate file.compat.phpis intended to be reserved for functions with a corresponding WordPress proposal ticket proposing the addition of a function. - (Future) Remove the function after the deprecation period has elapsed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Backwards CompatibilityIssues or PRs that impact backwards compatabilityIssues or PRs that impact backwards compatabilityFrameworkIssues related to broader framework topics, especially as it relates to javascriptIssues related to broader framework topics, especially as it relates to javascriptGood First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality
Type
Fields
Give feedbackNo fields configured for issues without a type.