Skip to content

Commit

Permalink
Cron API: Clear the recovery_mode_clean_expired_keys cron event whe…
Browse files Browse the repository at this point in the history
…n converting a single site installation to Multisite.

This cron event is not used when Multisite is in use.

Props debarghyabanerjee, johnbillion, narenin

Fixes #61450

git-svn-id: https://develop.svn.wordpress.org/trunk@59798 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
johnbillion committed Feb 10, 2025
1 parent b93ecb8 commit 9b17242
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wp-admin/includes/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,11 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam
)
);

// Remove the cron event since Recovery Mode is not used in Multisite.
if ( wp_next_scheduled( 'recovery_mode_clean_expired_keys' ) ) {
wp_clear_scheduled_hook( 'recovery_mode_clean_expired_keys' );
}

/*
* When upgrading from single to multisite, assume the current site will
* become the main site of the network. When using populate_network()
Expand Down

0 comments on commit 9b17242

Please sign in to comment.