[wp-trac] [WordPress Trac] #53332: Transforming a Legacy Widget to a Block Widget is not possible in WP 5.8
WordPress Trac
noreply at wordpress.org
Sat Jun 12 12:37:28 UTC 2021
#53332: Transforming a Legacy Widget to a Block Widget is not possible in WP 5.8
--------------------------+---------------------
Reporter: imath | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.8
Component: Widgets | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Changes (by imath):
* keywords: => has-patch
Comment:
I've found the reason why. While the documentation page and the Gutenberg
plugin are using the Widget's class `$show_instance_in_rest` property.
WordPress decided to stop checking this property into the Widgets REST
endpoints in favor of looking into the
`$widget_options['show_instance_in_rest']` property.
[https://core.trac.wordpress.org/attachment/ticket/53332/53332.patch
53332.patch] is fixing my issue. The patch is a kind of back compatibility
mechanism for early testers who got used to the `$show_instance_in_rest`
property.
If you think it's not needed, I'd advise to at least update this
[https://developer.wordpress.org/block-editor/how-to-guides/widgets
/legacy-widget-block/ documentation page] (to avoid misleading developers)
to explain people now need to include a
`$widget_options['show_instance_in_rest'] = true` when registering their
widget.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53332#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list