Created
August 5, 2014 12:33
-
-
Save tomhemsley/e985db339da947fa035d to your computer and use it in GitHub Desktop.
Meta Slider Change Capability / User Role Editor
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
/** | |
* 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