[wp-trac] Re: [WordPress Trac] #2526: WP DB Backup plugin is using $user_level instead of capabilities

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 26 22:46:17 GMT 2006


#2526: WP DB Backup plugin is using $user_level instead of capabilities
----------------------------+-----------------------------------------------
       Id:  2526            |      Status:  assigned                
Component:  Administration  |    Modified:  Sun Mar 26 22:46:17 2006
 Severity:  normal          |   Milestone:  2.1                     
 Priority:  normal          |     Version:  2.0.1                   
    Owner:  robmiller       |    Reporter:  markjaquith             
----------------------------+-----------------------------------------------
Comment (by robmiller):

 Hmm, yeah. How does one pass a cap to add_*_page(), then?

 I guess you could do

 {{{
 if(current_user_can('manage_options')) {
     add_management_page(__('Backup'), __('Backup'), 0, basename(__FILE__),
 array(&$this, 'backup_menu'));
 }
 }}}

 But that seems pretty hackish. It seems like it would be better to modify
 the add_*_page functions to take caps.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2526>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list