diff --git wp-admin/includes/class-wp-posts-list-table.php wp-admin/includes/class-wp-posts-list-table.php
index e626039..95148cc 100644
|
|
class WP_Posts_List_Table extends WP_List_Table { |
645 | 645 | $edit_link = get_edit_post_link( $post->ID ); |
646 | 646 | $title = _draft_or_post_title(); |
647 | 647 | $post_type_object = get_post_type_object( $post->post_type ); |
648 | | $can_edit_post = current_user_can( 'edit_post', $post->ID ); |
| 648 | $can_edit_post = current_user_can( $post_type_object->cap->edit_posts, $post->ID ); |
649 | 649 | |
650 | 650 | $classes = 'iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); |
651 | 651 | |
diff --git wp-admin/post.php wp-admin/post.php
index 0c38b56..3bbb936 100644
|
|
case 'edit': |
152 | 152 | if ( ! $post_type_object ) |
153 | 153 | wp_die( __( 'Unknown post type.' ) ); |
154 | 154 | |
155 | | if ( ! current_user_can( 'edit_post', $post_id ) ) |
| 155 | if ( ! current_user_can( $post_type_object->cap->edit_posts, $post_id ) ) |
156 | 156 | wp_die( __( 'You are not allowed to edit this item.' ) ); |
157 | 157 | |
158 | 158 | if ( 'trash' == $post->post_status ) |
diff --git wp-includes/link-template.php wp-includes/link-template.php
index 1f90199..bfe384b 100644
|
|
function get_edit_post_link( $id = 0, $context = 'display' ) { |
1181 | 1181 | if ( !$post_type_object ) |
1182 | 1182 | return; |
1183 | 1183 | |
1184 | | if ( !current_user_can( 'edit_post', $post->ID ) ) |
| 1184 | if ( !current_user_can( $post_type_object->cap->edit_posts, $post->ID ) ) |
1185 | 1185 | return; |
1186 | 1186 | |
1187 | 1187 | /** |