enable_maintenance_mode WordPress Filter Hook

The enable_maintenance_mode hook enables maintenance mode for a Wordpress site. This mode is typically used when a site is undergoing maintenance or updates, and allows the site administrator to specify a message that will be displayed to visitors while the site is in maintenance mode.

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.


Top ↑

Parameters

$enable_checks

(bool)Whether to enable maintenance mode. Default true.

$upgrading

(int)The timestamp set in the .maintenance file.


Top ↑

Source

File: wp-includes/load.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.