WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #27404, comment 34


Ignore:
Timestamp:
02/23/2016 03:13:47 PM (2 years ago)
Author:
rramo012
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27404, comment 34

    initial v1  
    88> In terms of Customizer architecture, I wonder if instead of introducing a new setting `widgets_deleted`, whether it would be better to instead just rely on the existing `widget_{id_base}[{number}]` settings.
    99
    10 That was my initial approach. The reasoning behind going with a new customizer setting was that setting the widget instance to false was causing failures in sanitation (WP_Customize_Widgets->sanitize_widget_instance()). I didn't want to unintentionally make the existing sanitation for widget instances venerable. Instead I treated it similarly to a sidebars and used its sanitation. Additionally I feel the intention is more clear when a widget is added to a deletion array.
     10That was my initial approach. The reasoning behind going with a new customizer setting was that setting the widget instance to false was causing failures in sanitation (WP_Customize_Widgets->sanitize_widget_instance()). I didn't want to unintentionally make the existing sanitation for widget instances vulnerable. Instead I treated it similarly to a sidebars and used its sanitation. Additionally I feel the intention is more clear when a widget is added to a deletion array.