WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #32474, comment 22


Ignore:
Timestamp:
06/18/2015 07:00:30 PM (4 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32474, comment 22

    v1 v2  
    66
    77I meant that if core stops using options for saving the widgets data, the existing `pre_option_*` filters will never run, so all plugins that use them will break. And there is no way for core to add backwards compatibility to prevent that breakage. Of course the authors of these plugins will probably update them if/when that happens, it's just that using low-level filters for commonly needed tasks is not a good idea :)
     8
     9Also, if we had new filters, we could pass either simple arrays or `ArrayIterator` objects without any back-compat concerns (see below).
    810
    911> ...plugins now have the ''option'' of filtering the `widget_{$id_base}` options to return `ArrayIterator` objects instead of intrinsic arrays, and `WP_Widget` will handle them successfully.