Posts List Table:
Don't show bulk actions if the user can't edit posts. Props DrewAPicture. Fixes #29789. Built from https://develop.svn.wordpress.org/trunk@33713 git-svn-id: http://core.svn.wordpress.org/trunk@33680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dffa53dca8
commit
b1c00f2653
|
@ -282,6 +282,11 @@ 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 {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-33712';
|
||||
$wp_version = '4.4-alpha-33713';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue