Make WordPress Core

Ticket #53323: 53323-upgrade-activation.diff

File 53323-upgrade-activation.diff, 1.1 KB (added by SirLouen, 6 months ago)
  • src/wp-admin/includes/upgrade.php

    diff --git src/wp-admin/includes/upgrade.php src/wp-admin/includes/upgrade.php
    index a3c7260a04..8abd891018 100644
    function upgrade_all() { 
    880880
    881881        if ( $wp_current_db_version < 58975 ) {
    882882                upgrade_670();
     883                upgrade_690();
    883884        }
    884885        maybe_disable_link_manager();
    885886
    function upgrade_670() { 
    24392440                wp_set_options_autoload( $options, false );
    24402441        }
    24412442}
     2443
     2444/**
     2445 * Executes changes made in WordPress 6.9.0.
     2446 *
     2447 * @ignore
     2448 * @since 6.9.0
     2449 *
     2450 * @global int $wp_current_db_version The old (current) database version.
     2451 */
     2452function upgrade_690() {
     2453        global $wp_current_db_version;
     2454
     2455        // Switch Hello Dolly from file to directory format. See #53323
     2456        $active_plugins = get_option( 'active_plugins' );
     2457        $old_plugin     = 'hello.php';
     2458        $new_plugin     = 'hello-dolly/hello.php';
     2459        $key            = array_search( $old_plugin, $active_plugins, true );
     2460
     2461        if ( $key ) {
     2462                $active_plugins[ $key ] = $new_plugin;
     2463                update_option( 'active_plugins', $active_plugins );
     2464        }
     2465}
    24422466/**
    24432467 * Executes network-level upgrade routines.
    24442468 *