[wp-trac] [WordPress Trac] #49959: Introduce a new helper function to check if WordPress is currently in maintenance mode
WordPress Trac
noreply at wordpress.org
Fri May 8 21:51:18 UTC 2020
#49959: Introduce a new helper function to check if WordPress is currently in
maintenance mode
-----------------------------------+-----------------------------
Reporter: Clorith | Owner: SergeyBiryukov
Type: enhancement | Status: reopened
Priority: normal | Milestone: 5.5
Component: Upgrade/Install | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* keywords: has-patch => has-patch 2nd-opinion
* status: closed => reopened
* resolution: fixed =>
Comment:
Replying to [comment:1 Clorith]:
> [attachment:"49959.patch"] implements the proposed function, using the
name `wp_in_maintenance_mode()`, as it checks the state, so the use of
`is` might have ended up being confusing to some.
It occurred to me that we already have
[https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/
wp_is_recovery_mode()] and
[https://developer.wordpress.org/reference/functions/wp_is_fatal_error_handler_enabled/
wp_is_fatal_error_handler_enabled()].
Perhaps `wp_is_maintenance_mode()` or `wp_is_maintenance_mode_enabled()`
would be a better name for consistency with those two functions? I'm not
100% sure the existing name from [47623] should be changed, just wanted to
bring it up for discussion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49959#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list