Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #50848, comment 12


Ignore:
Timestamp:
08/25/2020 08:00:25 PM (5 years ago)
Author:
pbiron
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50848, comment 12

    initial v1  
    1212The intention of that code is to detect whether anything has hooked into that filter and is returning a truthy or falsey value...so that the UI can display "Auto-updates enabled" or "Auto-updates disabled" as plain text instead of displaying the enable/disable links.  Hence, passing `false` would be the wrong thing to do there.
    1313
    14 The uses in site health are similar: if the filter returns a truthy or falsey value (instead of `null`) then that value overrides whether the user preference stored (or not) in the site option when constructing the text for whether the plugin/theme will auto-update.  And so, passing `false` there would be wrong as well.
     14The uses in site health are similar: if the filter returns a truthy or falsey value (instead of `null`) then that value overrides the user preference stored (or not) in the site option when constructing the text for whether the plugin/theme will auto-update.  And so, passing `false` there would be wrong as well.
    1515
    1616And the use in single-site themes.php is also the same.