mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 14:53:08 +02:00
Themes: Show an error message to logged-in users if a template file isn't loaded.
On the off-chance the active theme folder is renamed or deleted, a "white screen of death" was displayed to the user. Instead, the user is shown a useful error screen displaying any errors the theme has (e.g. if the theme can't be found). Props MikeHansenMe, SergeyBiryukov. See #21931. Built from https://develop.svn.wordpress.org/trunk@36335 git-svn-id: http://core.svn.wordpress.org/trunk@36302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
82c596594b
commit
435196fc40
@ -84,7 +84,13 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) :
|
|||||||
*
|
*
|
||||||
* @param string $template The path of the template to include.
|
* @param string $template The path of the template to include.
|
||||||
*/
|
*/
|
||||||
if ( $template = apply_filters( 'template_include', $template ) )
|
if ( $template = apply_filters( 'template_include', $template ) ) {
|
||||||
include( $template );
|
include( $template );
|
||||||
|
} elseif ( is_user_logged_in() ) {
|
||||||
|
$theme = wp_get_theme();
|
||||||
|
if ( $theme->errors() ) {
|
||||||
|
wp_die( $theme->errors() );
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
endif;
|
endif;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-1453046591767';
|
$wp_version = '4.5-alpha-1453051752378';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user