Last active
August 29, 2015 14:27
-
-
Save patrickgilmour/a107ef95020574b8388a to your computer and use it in GitHub Desktop.
option_page_capability
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 | |
/** | |
* Allow users with capability 'my_edit_settings' to edit the `my_plugin_options` settings of your Plugin | |
* | |
* This avoids giving them 'manage_options' capabilities | |
* | |
* @category WordPress | |
* @see https://codex.wordpress.org/Function_Reference/add_options_page | |
* | |
*/ | |
add_filter('option_page_capability_my_plugin_options', create_function( NULL, 'return "my_edit_settings";' ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment