[wp-trac] [WordPress Trac] #54026: One admin menu item from different plugins
WordPress Trac
noreply at wordpress.org
Fri Aug 27 15:02:02 UTC 2021
#54026: One admin menu item from different plugins
----------------------------+------------------------------
Reporter: kimjo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: close | Focuses: administration
----------------------------+------------------------------
Changes (by SergeyBiryukov):
* keywords: => close
Comment:
Hi there, welcome to WordPress Trac! Thanks for the report.
> Is there a way to avoid that behaviour ?
Just removing one of the two `add_menu_page()` calls (doesn't matter which
one) should give you one menu item with two submenus. If that is not
feasible for whatever reason, calling `remove_menu_page( 'test-plugin-
admin' )` after both plugins are loaded should remove the first menu item
and keep the second one.
I have just tested both options, and they appear to work. I'm marking the
ticket as a `close` candidate, as it looks like WordPress core works as
expected here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54026#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list