Make WordPress Core


Ignore:
Timestamp:
12/16/2010 09:18:28 AM (14 years ago)
Author:
nacin
Message:

Replace check_permissions() with ajax_user_can(). New method returns true/false to current_user_can(), which we then handle in admin ajax. see #15326.

File:
1 edited

Legend:

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

    r16990 r16992  
    1212    var $features = array();
    1313
    14     function check_permissions() {
     14    function ajax_user_can() {
    1515        // Do not check edit_theme_options here. AJAX calls for available themes require switch_themes.
    16         if ( !current_user_can('switch_themes') )
    17             wp_die( __( 'Cheatin’ uh?' ) );
     16        return current_user_can('switch_themes');
    1817    }
    1918
Note: See TracChangeset for help on using the changeset viewer.