-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Bootstrap wp-admin before rendering widgets – they may rely on wp-admin functions being loaded. #33454
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 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.
adamziel
added
[Feature] Widgets Screen
The block-based screen that replaced widgets.php.
Backport to WP 6.7 Beta/RC
Pull request that needs to be backported to the WordPress major release that's currently in beta
[Block] Legacy Widget
Affects the Legacy Widget Block - used for displaying Classic Widgets
[Package] Edit Widgets
/packages/edit-widgets
labels
Jul 15, 2021
adamziel
requested review from
peterwilsoncc,
noisysocks,
TimothyBJacobs,
hellofromtonya and
kevin940726
July 15, 2021 11:42
…ize of the safety net it provides.
Co-authored-by: Tonya Mork <hello@hellofromtonya.com>
hellofromtonya
approved these changes
Jul 15, 2021
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 <hello@hellofromtonya.com> Co-authored-by: Tonya Mork <hello@hellofromtonya.com>
youknowriad
removed
the
Backport to WP 6.7 Beta/RC
Pull request that needs to be backported to the WordPress major release that's currently in beta
label
Jul 15, 2021
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 <hello@hellofromtonya.com> Co-authored-by: Tonya Mork <hello@hellofromtonya.com>
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)