[wp-trac] [WordPress Trac] #4907: add_menu_page() create faulty links

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 4 18:22:33 GMT 2007


#4907: add_menu_page() create faulty links
-------------------------+--------------------------------------------------
 Reporter:  markjaquith  |       Owner:  anonymous
     Type:  defect       |      Status:  new      
 Priority:  high         |   Milestone:  2.3      
Component:  General      |     Version:  2.3      
 Severity:  major        |    Keywords:           
-------------------------+--------------------------------------------------
 {{{
 <?php
 /*
 Plugin Name: Menu Test
 */

 function cws_add_menu() {
         add_menu_page("Top Level Page", "Top Level Page", 'read', 'cws-
 top-level-page', 'cws_top_level_page');
 }

 function cws_top_level_page() {
         echo "<p>Top Level Page!</p>";
 }

 add_action('admin_menu', 'cws_add_menu');
 ?>
 }}}

 Expected:

 Top level link to "admin.php?page=cws-top-level-page"

 Actual result:

 Top level link to "cws-top-level-page" (404)

 Accessing the correct link manually works.

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


More information about the wp-trac mailing list