Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#53289 closed defect (bug) (fixed)

Add missing delete_widget action to REST endpoint

Reported by: isabel_brison's profile isabel_brison Owned by: noisysocks's profile 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)

TimothyBJacobs commented on PR #1309:


4 years ago
#2

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 years ago

  • Milestone changed from Awaiting Review to 5.8

noisysocks commented on PR #1309:


4 years ago
#4

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 years 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.

tellthemachines commented on PR #1309:


4 years ago
#6

Closing as this has been committed already.

Note: See TracTickets for help on using tickets.