[wp-trac] [WordPress Trac] #15067: Deprecate exiting admin menu functions and add new ones that accept an $args parameter instead

WordPress Trac wp-trac at lists.automattic.com
Mon May 9 10:26:59 UTC 2011


#15067: Deprecate exiting admin menu functions and add new ones that accept an
$args parameter instead
----------------------------+-----------------------
 Reporter:  mikeschinkel    |       Owner:
     Type:  enhancement     |      Status:  reopened
 Priority:  normal          |   Milestone:  3.2
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+-----------------------

Comment (by scribu):

 > I'm not a big fan of using an array for arguments when they are all
 required.

 Did you look at the function definition recently?

 {{{function add_menu_page( $page_title, $menu_title, $capability,
 $menu_slug, $function = '', $icon_url = '', $position = NULL ) {}}}

 $menu_title could default to $page_title and $capability could default to
 'manage_options'. So, that would leave a total of 2 required arguments out
 of 7.

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


More information about the wp-trac mailing list