Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Created April 3, 2019 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasplevy/48410d189a9df87a956fca85e700f886 to your computer and use it in GitHub Desktop.
Save thomasplevy/48410d189a9df87a956fca85e700f886 to your computer and use it in GitHub Desktop.
Modify the default capability required to access LifterLMS Private Posts and Automations
<?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