wp-admin/includes/class-theme-upgrader.php:683Turns on maintenance mode before attempting to upgrade the active theme.
$responsebool|WP_Error$themearraybool|WP_Error public function current_before( $response, $theme ) { if ( is_wp_error( $response ) ) { return $response; } $theme = $theme['theme'] ?? ''; // Only run if active theme. if ( get_stylesheet() !== $theme ) { return $response; } // Change to maintenance mode. Bulk edit handles this separately. if ( ! $this->bulk ) { $this->maintenance_mode( true ); } return $response; }Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-admin/includes/class-theme-upgrader.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.