On this page
apply_filters( 'enable_maintenance_mode', bool $enable_checks, int $upgrading )
Filters whether to enable maintenance mode.
Description
This filter runs before it can be used by plugins. It is designed for non-web runtimes. If this filter returns true, maintenance mode will be active and the request will end. If false, the request will be allowed to continue processing even if maintenance mode should be active.
Parameters
$enable_checksbool-
Whether to enable maintenance mode. Default true.
$upgradingint-
The timestamp set in the .maintenance file.
Source
File: wp-includes/load.php. View all references
if ( ! apply_filters( 'enable_maintenance_mode', true, $upgrading ) ) {
Related
Used By
| Used By | Description |
|---|---|
| wp_is_maintenance_mode() wp-includes/load.php | Check if maintenance mode is enabled. |
Changelog
| Version | Description |
|---|---|
| 4.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/enable_maintenance_mode