Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#53534 closed defect (bug) (fixed)

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

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

Description

  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.


3 years ago
#1

  • Keywords has-patch added

#2 @noisysocks
3 years 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.