From cdd034f80f1a4d47fdb36bca2406127bf8db19f3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 26 Mar 2019 23:38:37 +0000 Subject: [PATCH] Bootstrap/Load: Use `wp_die()` instead of hardcoded HTML in `wp_maintenance()`, so the output can be filtered by plugins. Props spacedmonkey. Fixes #45974. git-svn-id: https://develop.svn.wordpress.org/trunk@45019 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/load.php | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 684659d57e..89d1491ad9 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -213,32 +213,17 @@ function wp_maintenance() { require_once( WP_CONTENT_DIR . '/maintenance.php' ); die(); } - + + require_once( ABSPATH . WPINC . '/functions.php' ); wp_load_translations_early(); - $protocol = wp_get_server_protocol(); - header( "$protocol 503 Service Unavailable", true, 503 ); - header( 'Content-Type: text/html; charset=utf-8' ); header( 'Retry-After: 600' ); - $dir_attr = ''; - if ( is_rtl() ) { - $dir_attr = ' dir="rtl"'; - } - ?> - - > - - - <?php _e( 'Maintenance' ); ?> - - - -

- - -