Make WordPress Core

Opened 8 years ago

Last modified 6 years ago

#39050 new enhancement

New Core Admin Menu Functions -- `add_menu_link` and `add_submenu_link`

Reported by: georgestephanis's profile georgestephanis Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Currently if a plugin would like to add admin menu links that go to a url, instead of a registered admin page, there are only two options:

Option 1: Register a dummy admin page, and add an action that sets up a wp_redirect on load.
Option 2: Mess with the menu globals directly.

Neither of these is a particularly good option, and encouraging messing with globals directly feels bad.

To that end, this will let folks add admin menu links -- whether to plugin support forums, to the customizer even (there is no good way to add deep links to the customizer currently), and the like.

Is this something we'd like to support?

Attachments (1)

39050.diff (5.2 KB) - added by georgestephanis 8 years ago.

Download all attachments as: .zip

Change History (3)

This ticket was mentioned in Slack in #core by presskopp. View the logs.


8 years ago

Note: See TracTickets for help on using tickets.