[wp-trac] [WordPress Trac] #31593: Conflict of custom post type menu and add_utility_page

WordPress Trac noreply at wordpress.org
Wed Mar 11 07:00:52 UTC 2015

#31593: Conflict of custom post type menu and add_utility_page
 Reporter:  inc2734       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Menus         |    Version:  4.1.1
 Severity:  normal        |   Keywords:
  Focuses:                |
 I installed a plugin that register_post_type with menu_position 80.
 Thereafter, I installed a plugin to add a menu by add_utility_page. Then
 the menu of menu_position 80  is disappeared.

 Where I examined, I think there is a problem with the count up of
 `$_wp_last_utility_menu`, but is this correct specification?

 This is the sample code.

 function test_add_utility_page() {
 add_action( 'admin_menu', 'test_add_utility_page' );

 function test_register_post_type() {
     register_post_type( 'test_post_type', array(
         'labels'        => array(
             'name' => 'test_post_type',
         'public'        => true,
         'menu_position' => 80,
     ) );
 add_action( 'init', 'test_register_post_type' );

Ticket URL: <https://core.trac.wordpress.org/ticket/31593>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list