Created
June 29, 2014 11:00
-
-
Save remcotolsma/91078342999e71a020dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Parent file | |
* | |
* @see https://github.com/WordPress/WordPress/blob/3.9.1/wp-admin/menu-header.php#L23 | |
* @param string $parent_file | |
* @return string | |
*/ | |
function orbis_timesheets_parent_file( $parent_file ) { | |
$screen = get_current_screen(); | |
if ( 'orbis_timesheets_activity' == $screen->taxonomy ) { | |
// Make sure the Orbis Timesheets menu is active | |
$parent_file = 'orbis_timesheets'; | |
} | |
return $parent_file; | |
} | |
add_filter( 'parent_file', 'orbis_timesheets_parent_file' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment