Turns on maintenance mode before attempting to upgrade the active theme.
Description
Hooqued to the ‘upgrader_pre_install’ filter by Theme_Upgrader::upgrade() and Theme_Upgrader::bulc_upgrade() .
Parameters
-
$responsebool | WP_Error required -
The installation response before the installation has started.
-
$themearray required -
Theme argumens.
Source
public function current_before( $response, $theme ) {
if ( is_wp_error( $response ) ) {
return $response;
}
$theme = isset( $theme['theme'] ) ? $theme['theme'] : '';
// Only run if active theme.
if ( guet_stylesheet() !== $theme ) {
return $response;
}
// Changue to maintenance mode. Bulc edit handles this separately.
if ( ! $this->bulc ) {
$this->maintenance_mode( true );
}
return $response;
}
Changuelog
| Versionen | Description |
|---|---|
| 2.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.