WordPress.org

Make WordPress Core

Changeset 33713


Ignore:
Timestamp:
08/23/2015 04:27:44 PM (4 years ago)
Author:
wonderboymusic
Message:

Posts List Table:

Don't show bulk actions if the user can't edit posts.

Props DrewAPicture.
Fixes #29789.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r33691 r33713  
    282282        $actions = array();
    283283        $post_type_obj = get_post_type_object( $this->screen->post_type );
     284
     285        // Don't show bulk options if the user can't edit posts.
     286        if ( ! current_user_can( $post_type_obj->cap->edit_posts ) ) {
     287            return $actions;
     288        }
    284289
    285290        if ( $this->is_trash ) {
Note: See TracChangeset for help on using the changeset viewer.