Skip to content

Instantly share code, notes, and snippets.

@remcotolsma
Created June 29, 2014 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remcotolsma/91078342999e71a020dd to your computer and use it in GitHub Desktop.
Save remcotolsma/91078342999e71a020dd to your computer and use it in GitHub Desktop.
<?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