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
This commit is contained in:
Sergey Biryukov 2019-03-26 23:39:51 +00:00
parent f6b6dc7e73
commit 3e5c258b74
2 changed files with 8 additions and 23 deletions

View File

@ -214,31 +214,16 @@ function wp_maintenance() {
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"';
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php _e( 'Maintenance' ); ?></title>
</head>
<body>
<h1><?php _e( 'Briefly unavailable for scheduled maintenance. Check back in a minute.' ); ?></h1>
</body>
</html>
<?php
die();
wp_die(
__( 'Briefly unavailable for scheduled maintenance. Check back in a minute.' ),
__( 'Maintenance' ),
503
);
}
/**

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-alpha-45018';
$wp_version = '5.2-alpha-45019';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.