From a53b8ef1173154a9befe0ab8f679dcb8d79f860e Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@16337 602fd350-edb4-49c9-b593-d223f7449a82 --- 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'; ?>