Highlight admin menu when adding new config

This commit is contained in:
Brian Miyaji
2014-02-20 15:45:41 +11:00
parent ef1f919aa8
commit c22bfdf735

View File

@@ -1,10 +1,9 @@
<?php
function sportspress_admin_head() {
global $typenow;
if ( in_array( $typenow, array( 'sp_result', 'sp_outcome', 'sp_column', 'sp_statistic', 'sp_metric' ) ) ):
if ( in_array( $typenow, array( 'sp_result', 'sp_outcome', 'sp_column', 'sp_statistic', 'sp_metric' ) ) )
sportspress_highlight_admin_menu();
endif;
}
add_action( 'admin_head-edit.php', 'sportspress_admin_head', 10, 2 );
add_action( 'admin_head-post.php', 'sportspress_admin_head', 10, 2 );
add_action( 'admin_head-post-new.php', 'sportspress_admin_head', 10, 2 );