upgrade_650()
Executes changes made in WordPress 6.5.0.
No Hooks.
Returns
null. Nothing (null).
Usage
upgrade_650();
Notes
- Global. Int.
$wp_current_db_versionThe old (current) database version. - Global. wpdb.
$wpdbWordPress database abstraction object.
Changelog
| Since 6.5.0 | Introduced. |
upgrade_650() upgrade 650 code WP 7.0
function upgrade_650() {
global $wp_current_db_version, $wpdb;
if ( $wp_current_db_version < 57155 ) {
$stylesheet = get_stylesheet();
// Set autoload=no for all themes except the current one.
$theme_mods_options = $wpdb->get_col(
$wpdb->prepare(
"SELECT option_name FROM $wpdb->options WHERE autoload = 'yes' AND option_name != %s AND option_name LIKE %s",
"theme_mods_$stylesheet",
$wpdb->esc_like( 'theme_mods_' ) . '%'
)
);
$autoload = array_fill_keys( $theme_mods_options, false );
wp_set_option_autoload_values( $autoload );
}
}