Opened 13 months ago
Add subpage_file Filter Before Admin Menu
|Reported by:||Nessworthy||Owned by:|
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.