Created
August 23, 2017 13:24
-
-
Save svenl77/9f362505c6542f24a891ba1bc72c9cb4 to your computer and use it in GitHub Desktop.
Filter to set permissions in BuddyForms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* In this example we generally allow all to create and edit posts. This would be really dangerous and only should be used in closed intranets. | |
* In most situation you will use the filter to only fire in some situations. Please see the Groups Extension for a more complex example | |
* Link to the Groups Extension Example: https://github.com/BuddyForms/BuddyForms-Attach-Post-with-Group/blob/7d7d1b9c475cdfb076ef34963aeb94952a2e9545/includes/group-extension.php#L47 | |
*/ | |
add_filter( 'buddyforms_user_can_edit', 'buddyforms_user_can_edit' , 10, 3 ); | |
function buddyforms_user_can_edit( $found ) { | |
return true; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment