[wp-trac] [WordPress Trac] #20643: Custom Roles and Capabilities vs adding menu page for that user

WordPress Trac wp-trac at lists.automattic.com
Wed May 9 10:01:37 UTC 2012


#20643: Custom Roles and Capabilities vs adding menu page for that user
--------------------------+------------------------
 Reporter:  CyberSpy      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Users         |     Version:  3.3.2
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |
--------------------------+------------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch =>
 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Comment:

 There's a typo in your `add_cap()` example: `edit_ranking_strings` should
 be `edit_ranking_settings`.

 You should also add this in order to be able to save the settings:
 {{{
 function ranking_option_page_capability( $capability ) {
         return 'edit_ranking_settings';
 }
 add_filter( 'option_page_capability_ranking_options_group',
 'ranking_option_page_capability' );
 }}}
 See #14365.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20643#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list