From 1671533e39151da87e9c6e1b132477dfbe4709cd Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 6 Mar 2014 13:28:35 +1100 Subject: [PATCH] Highlight admin menu when adding table, list, or staff --- admin/hooks/admin-head.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/hooks/admin-head.php b/admin/hooks/admin-head.php index 3c9b5275..3bcb7d5e 100644 --- a/admin/hooks/admin-head.php +++ b/admin/hooks/admin-head.php @@ -3,6 +3,12 @@ function sportspress_admin_head() { global $typenow; if ( in_array( $typenow, array( 'sp_result', 'sp_outcome', 'sp_column', 'sp_statistic', 'sp_metric' ) ) ) sportspress_highlight_admin_menu(); + elseif ( $typenow == 'sp_table' ) + sportspress_highlight_admin_menu( 'edit.php?post_type=sp_team', 'edit.php?post_type=sp_table' ); + elseif ( $typenow == 'sp_list' ) + sportspress_highlight_admin_menu( 'edit.php?post_type=sp_player', 'edit.php?post_type=sp_list' ); + elseif ( $typenow == 'sp_staff' ) + sportspress_highlight_admin_menu( 'edit.php?post_type=sp_player', 'edit.php?post_type=sp_staff' ); } add_action( 'admin_head-edit.php', 'sportspress_admin_head', 10, 2 ); add_action( 'admin_head-post.php', 'sportspress_admin_head', 10, 2 );