[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 Oct 8 03:33:43 UTC 2010


#15067: Deprecate exiting admin menu functions and add new ones that accept an
$args parameter instead
--------------------------+-------------------------------------------------
 Reporter:  mikeschinkel  |       Owner:                 
     Type:  enhancement   |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:                 
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------
 Compared to the many  other APIs that accept `$args` the admin menu
 functions (`add_menu_page()`, `add_submenu_page()`,  etc.) are less
 accessible because of the 6 and 7 ordinal parameters are hard to remember
 and easy to get wrong.

 Suggestion is to deprecate those functions and replace with functional
 equivalents that use an $args array.  Since the functions are for admin
 menus but the names of the functions appear to be generic, we could easily
 name these proposed functions `add_admin_menu_page()` and
 `add_admin_submenu_page()`.

 See #12718.

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


More information about the wp-trac mailing list