Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › WordPress Posts Bulk Editor Professional not appearing in dashboard sidebar menu › Reply To: WordPress Posts Bulk Editor Professional not appearing in dashboard sidebar menu
19/03/2021 at 02:19
#7432
Vladimir
Keymaster
Fix is possible, if you are ready to edit this plugin code.
Replace can_manage_data() function at bulk-editor/classes/helper.php file (#356) with the version below. It allows to use plugin to any user who can ‘edit_others_posts’:
public static function can_manage_data($user_id = 0) {
if ($user_id === 0) {
$user = wp_get_current_user();
} else {
$user = get_userdata($user_id);
}
/*
if (in_array('administrator', $user->roles) OR in_array('editor', $user->roles)) {
return TRUE;
}
*/
if ( current_user_can('edit_others_posts') ) {
return TRUE;
}
return FALSE;
}
Take into account that you have to repeat this editing after any plugin update.