[wp-trac] [WordPress Trac] #41087: Customizer: Deleting a Widget does not remove instance in options
WordPress Trac
noreply at wordpress.org
Mon Jun 26 09:25:00 UTC 2017
#41087: Customizer: Deleting a Widget does not remove instance in options
----------------------------+--------------------
Reporter: timmydcrawford | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.8.1
Component: Customize | Version: 3.9
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+--------------------
Description changed by obenland:
Old description:
> When deleting a widget from {{{widgets.php}}}, for example a new Media
> Image Widget, the widget instance is removed from the
> {{{widget_media_image}}} site option, along with association/placement
> value in {{{sidebars_widgets}}}.
>
> However, if a widget is removed using the customizer, the widget data (
> again in this case testing with an image widget ), still exists in
> {{{get_option( 'widget_media_image' )}}}, while the entry in
> {{{sidebars_widgets}}} is again properly removed.
>
> It seems removal of a widget in both places ( widgets.php and customizer
> ) should result in the removal from the associated option in both cases.
New description:
When deleting a widget from {{{widgets.php}}}, for example a new Media
Image Widget, the widget instance is removed from the
{{{widget_media_image}}} site option, along with association/placement
value in {{{sidebars_widgets}}}.
In the customizer however, if a widget is removed without having been
saved first, the widget data ( again in this case testing with an image
widget ), still exists in {{{get_option( 'widget_media_image' )}}}, while
the entry in {{{sidebars_widgets}}} is either never added or properly
removed.
It seems removal of a widget in both places ( widgets.php and customizer )
should result in the removal from the associated option in both cases.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41087#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list