WordPress.org

Make WordPress Core

Changeset 17574


Ignore:
Timestamp:
03/31/11 06:33:20 (3 years ago)
Author:
nacin
Message:

Remove cryptic bitwise check. Todo, CPT/supports checks. see #17005.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r17381 r17574  
    5252$wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer)); 
    5353 
    54 $all_post_caps = array('posts', 'pages'); 
    55 $user_can_edit = false; 
    56 foreach ( $all_post_caps as $post_cap ) 
    57     $user_can_edit |= current_user_can("edit_$post_cap"); 
     54$user_can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ); 
    5855 
    5956/** 
Note: See TracChangeset for help on using the changeset viewer.