-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Bootstrap wp-admin before rendering widgets – they may rely on wp-admin functions being loaded. #33454
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
Merged
adamziel
merged 5 commits into
trunk
from
fix/load-admin-functions-before-rendering-widgets
Jul 15, 2021
Merged
Bootstrap wp-admin before rendering widgets – they may rely on wp-admin functions being loaded. #33454
adamziel
merged 5 commits into
trunk
from
fix/load-admin-functions-before-rendering-widgets
Jul 15, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…in functions being loaded.
…ize of the safety net it provides.
Co-authored-by: Tonya Mork <[email protected]>
hellofromtonya
approved these changes
Jul 15, 2021
Contributor
hellofromtonya
left a comment
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.
I can reproduce the original reported problem. Applying this PR's changes to core resolves the issue.
youknowriad
pushed a commit
that referenced
this pull request
Jul 15, 2021
…in functions being loaded. (#33454) * Bootstrap wp-admin before rendering widgets – they may rely on wp-admin functions being loaded. * Bootstrap wp-admin function also in /wp/v2/widgets endpoint * Add a dot at the end of the comment to satisfy linter requirements * Move the require_once statement to encode_form_data to increase the size of the safety net it provides. * Update lib/class-wp-rest-widget-types-controller.php Co-authored-by: Tonya Mork <[email protected]> Co-authored-by: Tonya Mork <[email protected]>
Contributor
|
This PR has been reverted. See the reasons why here #33443 (comment) |
youknowriad
pushed a commit
that referenced
this pull request
Jul 15, 2021
…in functions being loaded. (#33454) * Bootstrap wp-admin before rendering widgets – they may rely on wp-admin functions being loaded. * Bootstrap wp-admin function also in /wp/v2/widgets endpoint * Add a dot at the end of the comment to satisfy linter requirements * Move the require_once statement to encode_form_data to increase the size of the safety net it provides. * Update lib/class-wp-rest-widget-types-controller.php Co-authored-by: Tonya Mork <[email protected]> Co-authored-by: Tonya Mork <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Block] Legacy Widget
Affects the Legacy Widget Block - used for displaying Classic Widgets
[Feature] Widgets Screen
The block-based screen that replaced widgets.php.
[Package] Edit Widgets
/packages/edit-widgets
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Improves the situation of #33443
This PR ensures that wp-admin is bootstrapped before rendering any widgets. Some plugins, such as the Compact Archives plugin, assume that wp-admin functions are loaded and available because they were in the classic widgets editor.
This is a "quick" solution so that we may ship functional 5.8 RC4. A "proper" solution is still being discussed in #33443.
How has this been tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)