Make WordPress Core

Ticket #48357: 48357.diff

File 48357.diff, 1.8 KB (added by leogermani, 8 months ago)
  • wp-includes/option.php

    diff --git a/wp-includes/option.php b/wp-includes/option.php
    index 3620064..01f892a 100644
    a b function wp_load_core_site_options( $network_id = null ) { 
    277  * Update the value of an option that was already added.
     277 * Update the value of an option that was already added, or add a new option if it does not exist.
    278278 *
    279279 * You do not need to serialize values. If the value needs to be serialized, then
    280280 * it will be serialized before it is inserted into the database. Remember,
    281281 * resources can not be serialized or added as an option.
    282282 *
    283  * If the option does not exist, then the option will be added with the option value,
    284  * with an `$autoload` value of 'yes'.
     283 * If the option does not exist, it will be created
    286285 * This function is designed to work with or without a logged-in user. In terms of security,
    287286 * plugin developers should check the current user's capabilities before updating any options.
    function wp_load_core_site_options( $network_id = null ) { 
    296295 * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. For existing options,
    297296 *                              `$autoload` can only be updated using `update_option()` if `$value` is also changed.
    298297 *                              Accepts 'yes'|true to enable or 'no'|false to disable. For non-existent options,
    299  *                              the default value is 'yes'. Default null.
     298 *                              the default value is 'yes'. For existing options, the default value is `null` meaning the
     299 *                              current value will be kept.
    300300 * @return bool False if value was not updated and true if value was updated.
    301301 */
    302302function update_option( $option, $value, $autoload = null ) {