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:
parent
f6b6dc7e73
commit
3e5c258b74
|
@ -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"';
|
||||
}
|
||||
?>
|
||||
<!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
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue