#24531 closed enhancement (fixed)
Add subpage_file Filter Before Admin Menu
Reported by: | Nessworthy | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
For users extending the back end of wordpress, sometimes custom pages added to the main menu will not be flagged as the current page because of unexpected aspects such as additional GET data.
The problem is, setting this directly using a filter like admin_menu
does not work due to $subpage_file
being set later on (needs confirming), nor does it make sense due to context.
At the top of menu-header.php
, there is a filter called parent_file
, used to allow plugins/themes to move the submenu tabs around, a suggestion would be to add a subpage_file
filter, allowing plugins and the theme to modify the compared url to check the current page.
Would add a patch, but away from my development environment.
Attachments (3)
Change History (16)
#2
@
9 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 4.4
This ticket was mentioned in Slack in #core by sergey. View the logs.
9 years ago
#9
@
9 years ago
- Owner changed from chriscct7 to SergeyBiryukov
- Status changed from accepted to assigned
24531.diff adds a
submenu_file
filter right after theparent_file
filter. Not sure if$parent_file
should be added as a second parameter, but this filter would be already very useful in my Admin Menu Manager plugin.I think that could go into 4.4 with no problems.