From 3f643ba9afb092f89f05dd25dc9f4c89da326b0d Mon Sep 17 00:00:00 2001 From: Eric Lewis Date: Mon, 18 Jan 2016 19:57:26 +0000 Subject: [PATCH] Themes: Show template loading error to users with `switch_themes` cap. In [36338], a template loading error was shown only to users with the `install_themes` capability. This is now displayed users with the `switch_themes` capability, as users with this cap can at least switch to a different theme. Also, this will now show for site administrators in multisite, whereas `install_themes` is limited to superadmins. Props dd32. See #21931. Built from https://develop.svn.wordpress.org/trunk@36344 git-svn-id: http://core.svn.wordpress.org/trunk@36311 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-loader.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/template-loader.php b/wp-includes/template-loader.php index b466bc2cfe..45fd33e96b 100644 --- a/wp-includes/template-loader.php +++ b/wp-includes/template-loader.php @@ -86,7 +86,7 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) : */ if ( $template = apply_filters( 'template_include', $template ) ) { include( $template ); - } elseif ( current_user_can( 'install_themes' ) ) { + } elseif ( current_user_can( 'switch_themes' ) ) { $theme = wp_get_theme(); if ( $theme->errors() ) { wp_die( $theme->errors() ); diff --git a/wp-includes/version.php b/wp-includes/version.php index edcbe390d0..fb08a34b14 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-1453134913268'; +$wp_version = '4.5-alpha-1453147032750'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.