Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 512573

Delete, trash & restore for other user roles

$
0
0

Replies: 0

Is it also possible for the client, who as the subscriber user role, to delete/trash/restore entries? I don’t want to make the client admin. Because he can see all other options and pages, and maybe the client can accidentally break the site.

I tried to edit the admin.php but it did’nt seem to work:

switch ( $do_action ) {
case ‘delete’:
if( current_user_can( ‘delete_others_posts’ ) || current_user_can(‘subscriber’) ){
$result = Caldera_Forms_Entry_Bulk::delete_entries( $items );
}
$out[‘status’] = ‘reload’;
wp_send_json( $out );
break;

default:
if( current_user_can( ‘edit_others_posts’ ) || current_user_can(‘subscriber’) ){
$result = Caldera_Forms_Entry_Bulk::change_status( $items, $do_action );
}
break;
}


Viewing all articles
Browse latest Browse all 512573

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>