WordPress.org

Make WordPress Core

Opened 13 months ago

#24531 new enhancement

Add subpage_file Filter Before Admin Menu

Reported by: Nessworthy Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Administration Keywords:
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.

Change History (0)

Note: See TracTickets for help on using tickets.