wp-includes/ms-site.php:1162Triggers actions on site status updates.
$new_siteWP_Site$old_siteWP_Site|nulloptionalnull9 hooks fire while wp_maybe_transition_site_statuses_on_update() runs, in this order:
Fires when the 'spam' status is added to a site.
Fires when the 'spam' status is removed from a site.
Fires when the 'mature' status is added to a site.
Fires when the 'mature' status is removed from a site.
Fires when the 'archived' status is added to a site.
Fires when the 'archived' status is removed from a site.
Fires when the 'flagged for deletion' status is added to a site.
Fires when the 'flagged for deletion' status is removed from a site.
Fires after the current blog's 'public' setting is updated.
function wp_maybe_transition_site_statuses_on_update( $new_site, $old_site = null ) { $site_id = $new_site->id; // Use the default values for a site if no previous state is given. if ( ! $old_site ) { $old_site = new WP_Site( new stdClass() ); } if ( $new_site->spam !== $old_site->spam ) { if ( '1' === $new_site->spam ) { /** * Fires when the 'spam' status is added to a site. * * @since MU (3.0.0) * * @param int $site_id Site ID. */ do_action( 'make_spam_blog', $site_id ); } else { /** * Fires when the 'spam' status is removed from a site. * * @since MU (3.0.0) * * @param int $site_id Site ID. */ do_action( 'make_ham_blog', $site_id ); } } if ( $new_site->mature !== $old_site->mature ) { if ( '1' === $new_site->mature ) { /** * Fires when the 'mature' status is added to a site. * * @since 3.1.0 * * @param int $site_id Site ID. */ do_action( 'mature_blog', $site_id ); } else { /** * Fires when the 'mature' status is removed from a site. * * @since 3.1.0 * * @param int $site_id Site ID. */ do_action( 'unmature_blog', $site_id ); } } if ( $new_site->archived !== $old_site->archived ) { if ( '1' === $new_site->archived ) { /** * Fires when the 'archived' status is added to a site. * * @since MU (3.0.0) * * @param int $site_id Site ID. */ do_action( 'archive_blog', $site_id ); } else { /** * Fires when the 'archived' status is removed from a site. * * @since MU (3.0.0) * * @param int $site_id Site ID. */ do_action( 'unarchive_blog', $site_id ); } }Introduced in 5.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/ms-site.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.