buddyforms_user_can_edit

With the filter "buddyforms_user_can_edit" you can change the permission to create and edit posts. 

The filter comes with 3 attributes
$user_can_edit = apply_filters( 'buddyforms_user_can_edit', $user_can_edit, $form_slug, $post_id );

$user_can_edit
--> true or false 

$form_slug
--> The form slug

$post_id
--> The post ID. IS set to 0 if its a new post

In BuddyForms we have 3 different capabilities for every user role  

Create

current_user_can( 'buddyforms_' . $form_slug . '_craete' )

Edit

current_user_can( 'buddyforms_' . $form_slug . '_edit' )

Delete

current_user_can( 'buddyforms_' . $form_slug . '_delete' )

Usage:

Still need help? Contact Us Contact Us