Themes: Only users with proper capability should see theme errors.
After [36335], if a template file is not loaded, an error is displayed to logged-in users. As logged-in users may have no capabilities, this check is insubstantial. Limit the display of this error to users with the `install_themes` capability, i.e. someone who has the capacity to deal with the error. See #21931. Built from https://develop.svn.wordpress.org/trunk@36338 git-svn-id: http://core.svn.wordpress.org/trunk@36305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d17af5ff4b
commit
e62c559da3
|
@ -86,7 +86,7 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) :
|
|||
*/
|
||||
if ( $template = apply_filters( 'template_include', $template ) ) {
|
||||
include( $template );
|
||||
} elseif ( is_user_logged_in() ) {
|
||||
} elseif ( current_user_can( 'install_themes' ) ) {
|
||||
$theme = wp_get_theme();
|
||||
if ( $theme->errors() ) {
|
||||
wp_die( $theme->errors() );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-1453073892319';
|
||||
$wp_version = '4.5-alpha-1453075152649';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue