Skip to content

Commit

Permalink
Remove cryptic bitwise check. Todo, CPT/supports checks. see #17005.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@17574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Mar 31, 2011
1 parent 7baf775 commit 51b3f2f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions wp-admin/user-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@

$wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer));

$all_post_caps = array('posts', 'pages');
$user_can_edit = false;
foreach ( $all_post_caps as $post_cap )
$user_can_edit |= current_user_can("edit_$post_cap");
$user_can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' );

/**
* Optional SSL preference that can be turned on by hooking to the 'personal_options' action.
Expand Down

0 comments on commit 51b3f2f

Please sign in to comment.