WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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)

remove_delete_widgets.patch (2.5 KB) - added by pavelevap 7 years ago.
Remove_Delete_in_Customizer.png (12.9 KB) - added by pavelevap 7 years ago.

Download all attachments as: .zip

Change History (9)

#1 @kpdesign
7 years ago

  • Keywords has-patch added

#2 @westonruter
7 years ago

  • Keywords close added

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.

#3 @pavelevap
7 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 @ocean90
7 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.

#6 in reply to: ↑ 5 @ocean90
7 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.

#7 @pavelevap
7 years ago

OK, now I see it. I understand it, but it does not look very well when you have two different links and you are not familiar with this explanation... Maybe there could be also explaining hover over "Delete" link in Customizer...

Note: See TracTickets for help on using tickets.