[wp-trac] [WordPress Trac] #14159: menu_page_url not returning correct URL for custom submenus

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 30 18:10:09 UTC 2010


#14159: menu_page_url not returning correct URL for custom submenus
--------------------------+-------------------------------------------------
 Reporter:  williamsba1   |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.0            
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------
 When using the menu_page_url() function to determine the URL to a submenu
 of a custom top-level menu it's not returning the correct URL.

 The function returns:
 http://example.com/wp-admin/cpt_main_menu?page=cpt_sub_add_new

 The correct URL is:
 http://example.com/wp-admin/admin.php?page=cpt_sub_add_new

 For reference my submenu is registered like so:

 {{{
 add_submenu_page('cpt_main_menu', 'Add New', 'Add New', 'administrator',
 'cpt_sub_add_new', 'cpt_add_new');
 }}}

 I tested this on the custom top level menu and the URL returned is
 correct.  It only appears to be an issue with submenus of a custom top
 level menu

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


More information about the wp-trac mailing list