Make WordPress Core


Ignore:
Timestamp:
06/14/2024 03:19:20 PM (10 months ago)
Author:
joemcgill
Message:

Options: Fix some default autoload values used in core.

This fixes some autoload values that were updated in [58105] that used the database values of "on" and "off" instead of the boolean values true and false when being passed to add|update_option().

Props joemcgill, desrosj, rajinsharwar.
Fixes #61045. See #42441.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r58287 r58416  
    193193            update_site_option( 'can_compress_scripts', 0 );
    194194        } else {
    195             update_option( 'can_compress_scripts', 0, 'on' );
     195            update_option( 'can_compress_scripts', 0, true );
    196196        }
    197197        wp_die( 0 );
     
    232232                update_site_option( 'can_compress_scripts', 0 );
    233233            } else {
    234                 update_option( 'can_compress_scripts', 0, 'on' );
     234                update_option( 'can_compress_scripts', 0, true );
    235235            }
    236236        } elseif ( 'yes' === $_GET['test'] ) {
     
    240240                update_site_option( 'can_compress_scripts', 1 );
    241241            } else {
    242                 update_option( 'can_compress_scripts', 1, 'on' );
     242                update_option( 'can_compress_scripts', 1, true );
    243243            }
    244244        }
Note: See TracChangeset for help on using the changeset viewer.