You appear to be a bot. Output may be restricted
Description
Turn off maintenance mode after upgrading the current theme.
Hooked to the upgrader_post_install filter by Theme_Upgrader::upgrade() and Theme_Upgrader::bulk_upgrade().
Usage
$bool|WP_Error = Theme_Upgrader::current_after( $return, $theme );
Parameters
- $return
- ( bool|WP_Error ) required – Upgrade offer return.
- $theme
- ( array ) required – Theme arguments.
Returns
bool|WP_Error The passed in $return param or WP_Error.
Source
File name: wordpress/wp-admin/includes/class-theme-upgrader.php
Lines:
1 to 25 of 25
public function current_after( $return, $theme ) { if ( is_wp_error( $return ) ) { return $return; } $theme = isset( $theme['theme'] ) ? $theme['theme'] : ''; // Only run if current theme. if ( get_stylesheet() !== $theme ) { return $return; } // Ensure stylesheet name hasn't changed after the upgrade: if ( get_stylesheet() === $theme && $theme !== $this->result['destination_name'] ) { wp_clean_themes_cache(); $stylesheet = $this->result['destination_name']; switch_theme( $stylesheet ); } // Time to remove maintenance mode. Bulk edit handles this separately. if ( ! $this->bulk ) { $this->maintenance_mode( false ); } return $return; }