Make WordPress Core

Changeset 32481


Ignore:
Timestamp:
05/10/2015 04:58:00 PM (10 years ago)
Author:
DrewAPicture
Message:

Update the DocBlock description for update_option() to account for the ability to define the $autoload parameter, added in 4.2.

Props Clorith for the initial patch.
Fixes #32331.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r31640 r32481  
    217217 * resources can not be serialized or added as an option.
    218218 *
    219  * If the option does not exist, then the option will be added with the option
    220  * value, but you will not be able to set whether it is autoloaded. If you want
    221  * to set whether an option is autoloaded, then you need to use the add_option().
     219 * If the option does not exist, then the option will be added with the option value,
     220 * with an `$autoload` value of 'yes'.
    222221 *
    223222 * @since 1.0.0
     
    228227 * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. For existing options,
    229228 *                              `$autoload` can only be updated using `update_option()` if `$value` is also changed.
    230  *                              Accepts 'yes' or true to enable, 'no' or false to disable. For non-existent options,
    231  *                              the default value is 'yes'.
     229 *                              Accepts 'yes'|true to enable or 'no'|false to disable. For non-existent options,
     230 *                              the default value is 'yes'. Default null.
    232231 * @return bool False if value was not updated and true if value was updated.
    233232 */
Note: See TracChangeset for help on using the changeset viewer.