[wp-trac] [WordPress Trac] #48393: Fix from #38903 prevents options autoload parameter update

WordPress Trac noreply at wordpress.org
Mon Feb 8 13:32:21 UTC 2021


#48393: Fix from #38903 prevents options autoload parameter update
--------------------------------+------------------------------
 Reporter:  aboltro             |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:
 Severity:  major               |  Resolution:
 Keywords:  close 2nd-opinion   |     Focuses:  administration
--------------------------------+------------------------------

Comment (by herregroen):

 I'd disagree with the `wontfix`.

 While it's there in the documentation it's most definitely counter-
 intuitive and, perhaps more importantly, there's no alternate direct
 function to change an options' `autoload` property.

 This currently means that in order to change the `autoload` property of an
 option developers are forced to resort to direct `$wpdb` calls which
 shouldn't be necessary for something so simple.

 I think changing `update_option` so that `autoload` is updated even if the
 value is unchanged would be by far the most intuitive and elegant way of
 doing things. Of course if neither the value nor the `autoload` property
 have been changed then nothing should happen.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48393#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list