#30549 closed defect (bug) (invalid)
It is not possible to delete widget
Reported by: | pavelevap | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Widgets | Keywords: | |
Focuses: | Cc: |
Description
We are using "Remove" in some places for widgets (especially in Customizer), but in some other places there is "Delete". But it is not possible to "delete" widget, user can only "remove" it...
Attachments (2)
Change History (9)
#3
@
10 years ago
- Keywords close removed
Yes, but in the end widgets are only "removed" from sidebar and not "deleted". Technically only instance of widget with particular settings is deleted... "Remove" would be better, I guess, but if you want to preserve "Delete" then there are 2 related problems to solve:
1) We need a context for "Delete" for widgets, because this string is used also for deleting plugins, themes, etc. So, it is used in the context of "erase" in our language and we need to have different context here. I can create patch, if agreed.
2) See attached screenshot from Customizer. When you open Customizer you can see "Remove" for widget which was set before opening. But when you add new widget, you can "Delete" it. It is not very consistent and I wanted to unite those strings in previous patch.
#4
@
10 years ago
- Keywords has-patch removed
- Version changed from trunk to 3.9
As Weston says, "Delete" is the same as deleting a plugin/link/post/user/etc. "Remove" is for moving the widget into the inactive sidebar. No need for a context/string change here.
When adding a new widget in Customizer the widget isn't saved until you click "Save&Publish", so we can't really move the widget into the inactive sidebar. But after saving we should switch the label I think. That's the only issue I see here.
#5
follow-up:
↓ 6
@
10 years ago
The label should be getting switched from "Delete" to "Remove" already upon saving: https://github.com/xwp/wordpress-develop/blob/01b2c4502587354e30f0d2eb9f46c23425e166b7/src/wp-admin/js/customize-widgets.js#L856-L865
#6
in reply to:
↑ 5
@
10 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Replying to westonruter:
The label should be getting switched from "Delete" to "Remove" already upon saving
You're right, tested again and the label will be changed.
In the Customizer, when you click “Remove” on an existing widget, the widget is moved to the Inactive Widgets sidebar: it gets trashed. On the widgets admin page, “Delete” causes the widget to be deleted permanently. This behavior is also indicated in the Customizer when you hover over “Remove”, a tooltip is shown.