From c2a0336d22aaccfa428630a216a0f05c35f8e197 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 25 Aug 2015 20:12:22 +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. Built from https://develop.svn.wordpress.org/trunk@33733 git-svn-id: http://core.svn.wordpress.org/trunk@33701 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-posts-list-table.php | 15 ++++++--------- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 8d9abe9dba..2c51601d4a 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/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 ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index e78a96b770..2d5cbc86b6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33732'; +$wp_version = '4.4-alpha-33733'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.