From 755d109d108425370d54bb6a66de5f1e53609ddd Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 25 Aug 2015 20:11:27 +0000 Subject: [PATCH] Instead of [33713], allow `WP_Posts_List_Table::get_bulk_actions()` to check `edit_posts` AND `delete_posts`. Props DeBAAT. Fixes #29789. git-svn-id: https://develop.svn.wordpress.org/trunk@33733 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-posts-list-table.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index 8d9abe9dba..2c51601d4a 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -282,15 +282,12 @@ class WP_Posts_List_Table extends WP_List_Table { $actions = array(); $post_type_obj = get_post_type_object( $this->screen->post_type ); - // Don't show bulk options if the user can't edit posts. - if ( ! current_user_can( $post_type_obj->cap->edit_posts ) ) { - return $actions; - } - - if ( $this->is_trash ) { - $actions['untrash'] = __( 'Restore' ); - } else { - $actions['edit'] = __( 'Edit' ); + if ( current_user_can( $post_type_obj->cap->edit_posts ) ) { + if ( $this->is_trash ) { + $actions['untrash'] = __( 'Restore' ); + } else { + $actions['edit'] = __( 'Edit' ); + } } if ( current_user_can( $post_type_obj->cap->delete_posts ) ) {