Fix notice. Props wnorris. fixes #8433

git-svn-id: https://develop.svn.wordpress.org/trunk@11477 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-05-28 20:35:09 +00:00
parent 7a1a28e91f
commit 6bd92fd3df
1 changed files with 3 additions and 3 deletions

View File

@ -39,10 +39,10 @@ if ( !$user_id ) {
wp_die( __('Invalid user ID.') );
}
$all_post_types = apply_filters('all_post_types', array('post', 'page'));
$all_post_caps = array('posts', 'pages');
$user_can_edit = false;
foreach ( $all_post_types as $post_type )
$user_can_edit |= current_user_can("edit_$post_type");
foreach ( $all_post_caps as $post_cap )
$user_can_edit |= current_user_can("edit_$post_cap");
/**
* Optional SSL preference that can be turned on by hooking to the 'personal_options' action.