[wp-trac] [WordPress Trac] #54026: One admin menu item from different plugins

WordPress Trac noreply at wordpress.org
Tue Aug 31 13:03:35 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 karpstrucking):

 * keywords:   => close


 @kimjo you can wrap your `add_menu_page` function in an if-statement that
 checks if the menu item was already added by another plugin:

 if ( empty( menu_page_url( 'test-plugin-admin', false ) ) ) {

         add_menu_page("Test Plugin", "Test Item", "manage_options", "test-

Ticket URL: <https://core.trac.wordpress.org/ticket/54026#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list