[wp-trac] [WordPress Trac] #58062: Positioning of custom post type submenu

WordPress Trac noreply at wordpress.org
Wed Apr 12 19:06:05 UTC 2023


#58062: Positioning of custom post type submenu
-------------------------------+---------------------------------
 Reporter:  mort1305           |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  3.1
 Severity:  normal             |  Resolution:
 Keywords:  needs-patch        |     Focuses:  ui, administration
-------------------------------+---------------------------------
Changes (by oglekler):

 * keywords:   => needs-patch
 * version:  6.2 => 3.1


Comment:

 This is exactly as described. When a new post type is registered via
 [register_post_type](https://developer.wordpress.org/reference/functions/register_post_type/)
 function and show_in_menu is equal to parent menu slug such as
 'edit.php?post_type=page' this custom post type will be placed into this
 parent submenu but 'menu_position' argument has no effect on this.

 Modified code is provided by reporter is to  _add_post_type_submenus()
 function.

 It looks like a strait forward patch, and the only downside of this will
 be that custom post types used in submenus will suddenly be affected by
 menu order if it exists.

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


More information about the wp-trac mailing list