-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Trac 53489: Set sidebar state when rendering widgets block editor screen #1422
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
Conversation
6880acf to
e4bea90
Compare
| * @ticket 41683 | ||
| */ | ||
| public function test_get_items() { | ||
| wp_widgets_init(); |
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.
Should this go in setUp() so that we can avoid some repetition?
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.
Explored doing that. But it skews all the other tests that don't have it. In reviewing other widget tests, this init function is placed in each test that needs it. Not sure why yet. But it's on my test review TODO list across the test suite.
|
We probably need to add |
@TimothyBJacobs such as? I'm seeing the problem anywhere else. It's updating, removing, and rendering as expected. Do you foresee another problem area that could use it? |
|
I'm not sure to what degree Gutenberg is using those other callbacks and their responses. But if the data is missing for the |
Hmm, that's a good point. I'm not seeing that effect. But let me do a little bit more testing to see what happens with |
@TimothyBJacobs In testing, seems What if it were called in the future or by another plugin/theme? |
|
Great, let's ship it! |
Trac ticket: https://core.trac.wordpress.org/ticket/53489
Uses the same strategy as the classic widgets screen by running
retrieve_widgets(). In doing so, newly added sidebars are displayed in the Widgets Block Editor.This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.