WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#53289 closed defect (bug) (fixed)

Add missing delete_widget action to REST endpoint

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

Description

As documented in https://github.com/WordPress/gutenberg/issues/31126, the delete_widget action is missing for the new Widgets screen.

Change History (6)

#2 @prbot
4 months ago

TimothyBJacobs commented on PR #1309:

We need to do the same globals setup to match what they would have on the old screen, https://github.com/WordPress/wordpress-develop/blob/master/src/wp-admin/widgets-form.php#L157

#3 @SergeyBiryukov
4 months ago

  • Milestone changed from Awaiting Review to 5.8

#4 @prbot
4 months ago

noisysocks commented on PR #1309:

We need to do the same globals setup to match what they would have on the old screen, https://github.com/WordPress/wordpress-develop/blob/master/src/wp-admin/widgets-form.php#L157

https://github.com/WordPress/wordpress-develop/pull/1323 adds that $_POST global.

@tellthemachines: Let's commit https://github.com/WordPress/wordpress-develop/pull/1323 first and then rebase this so that we have that $_POST global.

#5 @noisysocks
4 months ago

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

In 51060:

REST API: Add 'delete_widget' action to delete widget endpoint

Triggers the 'delete_widget' action to the delete widget endpoint in the REST
API. This aligns with the behaviour in the widgets WP Admin screen.

Fixes #53289.
Props isabel_brison, TimothyBlynJacobs.

#6 @prbot
4 months ago

tellthemachines commented on PR #1309:

Closing as this has been committed already.

Note: See TracTickets for help on using tickets.