Widget Block: widget_id is undefined when a widget is placed #33152
Conversation
Tested and it fixes the issue. Not sure about the code though since i'm not familiar with PHP but it looks good to me. |
@spacedmonkey PHP linter has some complaints, would you address those please? |
@adamziel Done |
This seems like a reasonable backwards compatibility change. If we want to steer developers away from using these, we should add some |
cc70361
into
WordPress:trunk
18 checks passed
18 checks passed
youknowriad
added a commit
that referenced
this pull request
Jul 5, 2021
* Fix notice error * Fix lint
youknowriad
added a commit
that referenced
this pull request
Jul 6, 2021
* Fix notice error * Fix lint
youknowriad
added a commit
that referenced
this pull request
Jul 7, 2021
* Fix notice error * Fix lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Some widgets expect for the
widget_id
$args to be set to render the widget without a PHP notice error. Add back the widget_id and widget_name params to call tothe_widget
.See original core code when widget_id and widget_name are populated.
https://github.com/WordPress/wordpress-develop/blob/bdf7dd6299e4453f9d7438de0a0e138d950ec0bf/src/wp-includes/widgets.php#L737-L748
Trac ticket: https://core.trac.wordpress.org/ticket/53548
How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).Fixes #33056