Skip to content

Delete widgets that have been removed from all sidebars. - #26303

Closed
TimothyBJacobs wants to merge 1 commit into
WordPress:trunkfrom
TimothyBJacobs:update/delete-removed-widgets
Closed

TimothyBJacobs wants to merge 1 commit into
WordPress:trunkfrom
TimothyBJacobs:update/delete-removed-widgets

Conversation

@TimothyBJacobs

Copy link
Copy Markdown
Member

Description

After the widget areas have been saved, delete any widgets that had their blocks removed.

How has this been tested?

Manually tested.

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@TimothyBJacobs TimothyBJacobs added REST API Interaction Related to REST API [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Package] Edit Widgets /packages/edit-widgets labels Oct 19, 2020
@TimothyBJacobs TimothyBJacobs self-assigned this Oct 19, 2020
@draganescu draganescu mentioned this pull request Feb 18, 2021
41 of 53 tasks
Base automatically changed from master to trunk March 1, 2021 15:44
@draganescu

Copy link
Copy Markdown
Contributor

I wonder what is the role of inactive widgets area (see #26232) if we merge this behavior?

@TimothyBJacobs

Copy link
Copy Markdown
Member Author

I think that's a valid product question to explore. But in the current widgets area, deleting a widget deletes the widget, it doesn't move it to the inactive widgets area. That happens if the widget is moved there manually, or if the widgets can't be moved automatically by retrieve_widgets when the theme changes. The intent of this PR was to restore that behavior IIRC.

@kevin940726

kevin940726 commented Mar 26, 2021 •

Copy link
Copy Markdown
Member

This needs a rebase since we don't rely on clientId anymore. See #28379 and #29111.

@draganescu

Copy link
Copy Markdown
Contributor

Yes, after rebase, given the news from @kevin940726 the PR needs a rewrite :(

@TimothyBJacobs

Copy link
Copy Markdown
Member Author

👍 I don't have too much time this cycle, so I'll go ahead and close this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Package] Edit Widgets /packages/edit-widgets REST API Interaction Related to REST API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants