Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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