Make WordPress Core


Ignore:
Timestamp:
01/18/2016 07:56:54 PM (9 years ago)
Author:
ericlewis
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/template-loader.php

    r36338 r36344  
    8787    if ( $template = apply_filters( 'template_include', $template ) ) {
    8888        include( $template );
    89     } elseif ( current_user_can( 'install_themes' ) ) {
     89    } elseif ( current_user_can( 'switch_themes' ) ) {
    9090        $theme = wp_get_theme();
    9191        if ( $theme->errors() ) {
Note: See TracChangeset for help on using the changeset viewer.