Theme_Upgrader::current_before( bool|WP_Error $return, array $theme )
Turn on maintenance mode before attempting to upgrade the current theme.
Description Description
Hooked to the ‘upgrader_pre_install’ filter by Theme_Upgrader::upgrade() and Theme_Upgrader::bulk_upgrade().
Parameters Parameters
- $return
-
(bool|WP_Error) (Required)
- $theme
-
(array) (Required)
Return Return
(bool|WP_Error)
Source Source
File: wp-admin/includes/class-theme-upgrader.php
public function current_before( $return, $theme ) { if ( is_wp_error( $return ) ) { return $return; } $theme = isset( $theme['theme'] ) ? $theme['theme'] : ''; if ( $theme != get_stylesheet() ) { //If not current return $return; } //Change to maintenance mode now. if ( ! $this->bulk ) { $this->maintenance_mode( true ); } return $return; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |