Make WordPress Core


Ignore:
Timestamp:
12/16/2010 08:43:22 AM (14 years ago)
Author:
nacin
Message:

Remove check_permissions() calls outside of AJAX context. Also only check for switch_themes in check_permissions() for the themes table. see #15326.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-themes-list-table.php

    r16838 r16990  
    1313
    1414    function check_permissions() {
    15         if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') )
     15        // Do not check edit_theme_options here. AJAX calls for available themes require switch_themes.
     16        if ( !current_user_can('switch_themes') )
    1617            wp_die( __( 'Cheatin’ uh?' ) );
    1718    }
Note: See TracChangeset for help on using the changeset viewer.