Skip to content

Instantly share code, notes, and snippets.

@tomhemsley
Created August 5, 2014 12:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomhemsley/e985db339da947fa035d to your computer and use it in GitHub Desktop.
Save tomhemsley/e985db339da947fa035d to your computer and use it in GitHub Desktop.
Meta Slider Change Capability / User Role Editor
/**
* The default capability required to use Meta Slider is 'edit_others_posts'.
* You can change this to a different capability by pasting the code below into
* your themes functions.php file.
*
* You can use the 'User Role Editor' plugin to add a custom capability to WordPress
* specifically for Meta Slider users.
*/
function metaslider_change_required_role($capability) {
return 'metaslider_use'; // this is the ID of a custom capability added using User Role Editor
}
add_filter('metaslider_capability', 'metaslider_change_required_role');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment