wpseek.com
WordPress开发者和主题制作者的搜索引擎



enable_maintenance_mode › WordPress过滤钩子

Since4.6.0
已弃用n/a
apply_filters( 'enable_maintenance_mode', true, $upgrading )
参数: (2)
  • (bool) $enable_checks Whether to enable maintenance mode. Default true.
    Required: Yes
  • (int) $upgrading The timestamp set in the .maintenance file.
    Required: Yes
定义在:
文档:

Filters whether to enable maintenance mode.

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.





源码

if ( ! apply_filters( 'enable_maintenance_mode', true, $upgrading ) ) {