In wpdb::db_connect(), allow the loading of a custom database error template - this is already allowed in dead_db().
In `dead_db()`, move the call to `wp_load_translations_early()` before the inclusion of the `db-error.php` file to allow translation in both locations before the template is loaded. Props sbruner, kovshenin. Fixes #25703. Built from https://develop.svn.wordpress.org/trunk@27056 git-svn-id: http://core.svn.wordpress.org/trunk@26929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2793,6 +2793,8 @@ function wp_ob_end_flush_all() {
|
||||
function dead_db() {
|
||||
global $wpdb;
|
||||
|
||||
wp_load_translations_early();
|
||||
|
||||
// Load custom DB error template, if present.
|
||||
if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) {
|
||||
require_once( WP_CONTENT_DIR . '/db-error.php' );
|
||||
@@ -2807,8 +2809,6 @@ function dead_db() {
|
||||
status_header( 500 );
|
||||
nocache_headers();
|
||||
header( 'Content-Type: text/html; charset=utf-8' );
|
||||
|
||||
wp_load_translations_early();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
|
||||
|
||||
Reference in New Issue
Block a user