#45974 closed enhancement (fixed)
wp_maintenance should use wp_die
Reported by: | spacedmonkey | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Bootstrap/Load | Keywords: | has-patch early |
Focuses: | Cc: |
Description
When maintenance mode is active, wp_die called, so the output can be filtered by plugins.
Attachments (1)
Change History (11)
#2
@
6 years ago
- Focuses accessibility removed
Not sure why this ticket focuses accessibility
. Going to remove the focus to clean-up the accessibility report. If you feel this issue is related to web content accessibility and universal design, please do feel free to re-add it.
#3
@
6 years ago
- Milestone changed from Awaiting Review to 5.2
In 5.1 wp_die
received a number of improvements ( #45933 #46026 #46054 #46025 ). So using wp_die
add the following improvements here.
- Errors will be displayed in the correct format depending on the request, so xml, json, jsonp, xmlrpc and ajax request, will get the correctly formatted response.
- WP_CLI would be able to use as @pento mentions above.
- Error messages will be styled on look consistent with the rest of core.
- Future improvements to
wp_die
will be reflected in the maintenance mode. - Correct cache control headers will be sent. (See #46054 )
- As json request now handles better (see #45933), it means anything use REST API will error my gracefully (including Gutenberg).
The arguments can made for these tickets. #41655 #45975
I am making this as 5.2, in the hopes that is goes in.
Note: See
TracTickets for help on using
tickets.
What kind of plugins would be able to filter this output?
wp_maintenance()
is called before any plugins or dropins are loaded.WP-CLI would be able to use it (for example, the
enable_loading_advanced_cache_dropin
filter was added for WP-CLI), similar custom loaders could do it, too.