From 3e5c258b741fccda9424e3d07d0d1fd05a89b1f3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 26 Mar 2019 23:39:51 +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. Built from https://develop.svn.wordpress.org/trunk@45019 git-svn-id: http://core.svn.wordpress.org/trunk@44828 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/load.php | 29 +++++++---------------------- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/wp-includes/load.php b/wp-includes/load.php index 684659d57e..89d1491ad9 100644 --- a/wp-includes/load.php +++ b/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' ); ?> - - - -

- - -