From e8af3af849168b989587cf4fe2998e1e5482fb81 Mon Sep 17 00:00:00 2001 From: nacin Date: Sat, 13 Nov 2010 00:13:08 +0000 Subject: [PATCH] Use cap->edit_post in WP_Posts_List_Table. see #14122. git-svn-id: http://svn.automattic.com/wordpress/trunk@16337 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-posts-list-table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index dea8f65409..7c4a3ea7cb 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -467,7 +467,7 @@ class WP_Posts_List_Table extends WP_List_Table { $edit_link = get_edit_post_link( $post->ID ); $title = _draft_or_post_title(); $post_type_object = get_post_type_object( $post->post_type ); - $can_edit_post = current_user_can( 'edit_post', $post->ID ); + $can_edit_post = current_user_can( $post_type_object->cap->edit_post, $post->ID ); $post_format = get_post_format( $post->ID ); $post_format_class = ( $post_format && !is_wp_error($post_format) ) ? 'format-' . sanitize_html_class( $post_format ) : 'format-default'; ?>