Highlight admin menu when adding new config
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
function sportspress_admin_head() {
|
function sportspress_admin_head() {
|
||||||
global $typenow;
|
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();
|
sportspress_highlight_admin_menu();
|
||||||
endif;
|
|
||||||
}
|
}
|
||||||
add_action( 'admin_head-edit.php', 'sportspress_admin_head', 10, 2 );
|
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.php', 'sportspress_admin_head', 10, 2 );
|
||||||
|
add_action( 'admin_head-post-new.php', 'sportspress_admin_head', 10, 2 );
|
||||||
|
|||||||
Reference in New Issue
Block a user