[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
Fri Jan 14 09:46:48 UTC 2011


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

Comment (by mikeschinkel):

 I'd forgotten about this.

 Not all arguments are required; $ment_title could default to $page_title,
 $capability could default to 'read' if not 'edit_posts', and $function,
 $icon_url, and $position are defaulted so it could easily be:


 {{{
 add_menu_page(array(
   'page_title'=> "My Menu Page',
   'menu_slug'=> "edit.php?foo=bar',
 ))
 }}}

 I'll work on a patch soon.

 BTW, would `register_menu_page()` be inappropriate semantics and if so
 why? ''(I ask so I can understand when "add" is appropriate and "register"
 is appropriate.)''

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


More information about the wp-trac mailing list