[wp-trac] [WordPress Trac] #55121: classic widgets with no settings won't show up in 5.9
WordPress Trac
noreply at wordpress.org
Fri Feb 18 00:51:25 UTC 2022
#55121: classic widgets with no settings won't show up in 5.9
----------------------------+-----------------------
Reporter: joncampbell | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.9.2
Component: Widgets | Version: 5.9
Severity: normal | Resolution:
Keywords: has-patch php8 | Focuses:
----------------------------+-----------------------
Comment (by SergeyBiryukov):
Replying to [comment:20 jrf]:
> * Update any and all developer docs/handbooks propagating the incorrect
implementation of `WP_Widget` to show better code samples and to get rid
of the incorrect code pattern.
> * Do **NOT** change the return type to include `null`. `array|false` is
the documented expected type as per the above, so let's keep it that way.
> * Add a `_doing_it_wrong()` notice for when `null`is received, as
plugins should still be fixed for this incorrect implementation.
> * Work around a received `null` value.
I tend to agree with this approach.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55121#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list