[wp-trac] [WordPress Trac] #44460: Menu Items Conflict

WordPress Trac noreply at wordpress.org
Tue Jun 26 11:03:58 UTC 2018


#44460: Menu Items Conflict
-----------------------------------------------+---------------------------
 Reporter:  wlpdrpat                           |       Owner:  (none)
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
                                               |  Review
Component:  Menus                              |     Version:
 Severity:  normal                             |  Resolution:
 Keywords:  has-screenshots reporter-feedback  |     Focuses:
-----------------------------------------------+---------------------------
Changes (by subrataemfluence):

 * keywords:   => has-screenshots reporter-feedback
 * component:  General => Menus


Comment:

 I could not reproduce the error.

 The following code in my theme's `functions.php` generated 6 menu items
 but no existing item or new item got hidden by one another.

 {{{#!php
 <?php
 function add_menu_item(){
    $position_arr = array( 0, 1, 2, 3, 4, 5 );
    foreach ( $position_arr as $item ) {
         add_menu_page(
                 'Item-' . $item,
                 'ITEM-' . $item,
                 'manage_options',
                 'item-' . $item,
                 '',
                 'dashicons-wordpress-alt',
                 $item
         );
    }
 }

 add_action('admin_menu', 'add_menu_item');
 }}}

 I have attached a screenshot of my admin page with all existing and new
 menu items visible.

 Do I need anything else to reproduce the error?

 Project configuration:

 - WordPress version: 5.0-alpha-43320
 - Theme: twentyseventeen
 - Installation type: Single site

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44460#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list