[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
Tue Jun 15 21:36:41 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 needs-docs  |     Focuses:  docs, rest-api
----------------------------------+-----------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch => has-patch needs-docs
 * focuses:  rest-api => docs, rest-api


Comment:

 Replying to [comment:3 imath]:
 > 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.

 @imath thanks for chasing down and identifying the problem.


 Replying to [comment:3 imath]:
 > 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.

 The docs do need to be updated, which can be done upstream in the
 Gutenberg repo.

 What about the patch?

 As this is a new feature that hasn't shipped yet, I'm concerned about
 adding code. Why? The added code has to be maintained in core and could
 confuse both extenders and contributors.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53332#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list