[wp-trac] [WordPress Trac] #61939: Stop using 'yes' and 'no' for autoloading in favor of recommended boolean
WordPress Trac
noreply at wordpress.org
Tue Aug 27 16:35:33 UTC 2024
#61939: Stop using 'yes' and 'no' for autoloading in favor of recommended boolean
--------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.7
Component: Options, Meta APIs | Version:
Severity: normal | Keywords: needs-patch
Focuses: performance |
--------------------------------+-------------------------
As of WordPress 6.6, `add_option()` and `update_option()` encourage using
a boolean for the `$autoload` parameter rather than strings `'yes'` and
`'no'`.
#61929 makes the same update to the more recently introduced option
autoloading functions from WordPress 6.4.
While the old values remain supported for backward compatibility, it makes
sense for core to no longer use strings for the `$autoload` parameter of
the various function calls.
Note: Also related is #61103, however that ticket is focused on explicitly
setting an autoload values where previously none was provided, which is a
different purpose (and certainly a more complex one than this right here).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61939>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list