Make WordPress Core

Opened 5 weeks ago

Closed 5 weeks ago

#53534 closed defect (bug) (fixed)

Widgets REST API: Non-multi widgets don't appear in wp_inactive_widgets

Reported by: noisysocks Owned by: noisysocks
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Widgets Keywords: has-patch
Focuses: Cc:


  1. Add a non-WP_Widget e.g. [marquee widget https://gist.github.com/adamziel/526436b4cc9bc82a7221c77e00137ae1] to your WordPress installation.
  2. Hit up GET /wp/v2/widgets.

The marquee widget should appear in the wp_inactive_widgets sidebar but does not.

Change History (2)

This ticket was mentioned in PR #1433 on WordPress/wordpress-develop by noisysocks.

5 weeks ago

  • Keywords has-patch added

#2 @noisysocks
5 weeks ago

  • Owner set to noisysocks
  • Resolution set to fixed
  • Status changed from new to closed

In 51248:

Widgets REST API: Fix non-multi widgets not appearing in wp_inactive_widgets

Registered widgets that do not extend WP_Widget should appear in the
wp_inactive_widgets sidebar by default. Having the widgets REST API call
retrieve_widgets() before serving any request ensures that this will happen.

This is a similar fix to [51235].

Fixes #53534.
Props zieladam, timothyblynjacobs.

Note: See TracTickets for help on using tickets.