Created
April 3, 2019 18:36
-
-
Save thomasplevy/48410d189a9df87a956fca85e700f886 to your computer and use it in GitHub Desktop.
Modify the default capability required to access LifterLMS Private Posts and Automations
This file contains 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 // don't copy this line to the functions.php file! | |
/** | |
* Modify the default capability required to access LifterLMS Private Posts and Automations | |
* | |
* @param string $cap Default capability (manage_options) | |
* @return string | |
*/ | |
function my_custom_pa_cap( $cap ) { | |
return 'manage_lifterlms'; | |
} | |
add_filter( 'llms_pa_post_access', 'my_custom_pa_cap' ); | |
add_filter( 'llms_pa_post_automation_access', 'my_custom_pa_cap' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment