Make WordPress Core


Ignore:
Timestamp:
05/06/2024 04:33:27 PM (9 months ago)
Author:
joemcgill
Message:

Options: Update default autoload values used in core.

This updates the values used for the $autoload parameter in various functions to replace 'yes' and 'no' with 'on' and 'off', respectively.

Follow-up to [57920].

Props pbearne, mukesh27, joemcgill.
Fixes #61045. See #42441.

File:
1 edited

Legend:

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

    r58075 r58105  
    14131413
    14141414        if ( false === get_option( $transient_option ) ) {
    1415             $autoload = 'yes';
     1415            $autoload = 'on';
    14161416            if ( $expiration ) {
    1417                 $autoload = 'no';
    1418                 add_option( $transient_timeout, time() + $expiration, '', 'no' );
     1417                $autoload = 'off';
     1418                add_option( $transient_timeout, time() + $expiration, '', 'off' );
    14191419            }
    14201420            $result = add_option( $transient_option, $value, '', $autoload );
     
    14291429                if ( false === get_option( $transient_timeout ) ) {
    14301430                    delete_option( $transient_option );
    1431                     add_option( $transient_timeout, time() + $expiration, '', 'no' );
    1432                     $result = add_option( $transient_option, $value, '', 'no' );
     1431                    add_option( $transient_timeout, time() + $expiration, '', 'off' );
     1432                    $result = add_option( $transient_option, $value, '', 'off' );
    14331433                    $update = false;
    14341434                } else {
     
    20182018
    20192019    if ( ! is_multisite() ) {
    2020         $result = add_option( $option, $value, '', 'no' );
     2020        $result = add_option( $option, $value, '', 'off' );
    20212021    } else {
    20222022        $cache_key = "$network_id:$option";
     
    22642264
    22652265    if ( ! is_multisite() ) {
    2266         $result = update_option( $option, $value, 'no' );
     2266        $result = update_option( $option, $value, 'off' );
    22672267    } else {
    22682268        $value = sanitize_option( $option, $value );
Note: See TracChangeset for help on using the changeset viewer.