patrickgilmour
8/12/2015 - 4:43 PM

option_page_capability

option_page_capability

<?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";' ) );