Opened 12 years ago
Closed 12 years ago
#21445 closed defect (bug) (duplicate)
add_object_page() from admin_menu action: overwrites last menu
Reported by: | scottconnerly | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4.1 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
When the action admin_menu is fired, I have seen add_object_page() overwrite the last custom post type menu item. $_wp_last_object_menu is supposed to control this, but in this case, it failed.
Custom post types occupied menu positions 26 - 34. then calling add_object_page() at admin_menu overwrote position 34.
Changing the last post type's position to be 40 (so custom post types now occupy positions 26-33, 40), then add_object_page still resides in position 34, and the last post type still resides in 40.
Looking at the code, I can't find the bug myself, would appreciate assistance in pinning down the root cause.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Related: #12718