Skip to content

Bulk edit roles being skipped #373

@benplum

Description

@benplum

The canPerformBulkActions function has a typo. Lines 171 - 174 current read:

foreach ( $post_type_settings->bulk_edit_roles as $role ){
    if ( current_user_can($role) ) $allowed = true;
    break;
}

Right now it is breaking after the first role is checked ('admin'), and thus $allowed will always be false for other user roles. The fix is to add braces to the conditional:

foreach ( $post_type_settings->bulk_edit_roles as $role ){
    if ( current_user_can($role) ) {
        $allowed = true;
        break;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions