Combine players and staff in admin menu
This commit is contained in:
@@ -93,6 +93,8 @@ class SP_Admin_Menus {
|
|||||||
$this->highlight_admin_menu( 'edit.php?post_type=sp_team', 'edit.php?post_type=sp_table' );
|
$this->highlight_admin_menu( 'edit.php?post_type=sp_team', 'edit.php?post_type=sp_table' );
|
||||||
elseif ( $typenow == 'sp_list' )
|
elseif ( $typenow == 'sp_list' )
|
||||||
$this->highlight_admin_menu( 'edit.php?post_type=sp_player', 'edit.php?post_type=sp_list' );
|
$this->highlight_admin_menu( 'edit.php?post_type=sp_player', 'edit.php?post_type=sp_list' );
|
||||||
|
elseif ( $typenow == 'sp_staff' )
|
||||||
|
$this->highlight_admin_menu( 'edit.php?post_type=sp_player', 'edit.php?post_type=sp_staff' );
|
||||||
|
|
||||||
if ( isset( $submenu['sportspress'] ) && isset( $submenu['sportspress'][0] ) && isset( $submenu['sportspress'][0][0] ) ) {
|
if ( isset( $submenu['sportspress'] ) && isset( $submenu['sportspress'][0] ) && isset( $submenu['sportspress'][0][0] ) ) {
|
||||||
$submenu['sportspress'][0][0] = __( 'Settings', 'sportspress' );
|
$submenu['sportspress'][0][0] = __( 'Settings', 'sportspress' );
|
||||||
|
|||||||
@@ -542,7 +542,8 @@ class SP_Post_types {
|
|||||||
'supports' => array( 'title', 'author', 'thumbnail', 'excerpt' ),
|
'supports' => array( 'title', 'author', 'thumbnail', 'excerpt' ),
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
'show_in_nav_menus' => true,
|
'show_in_nav_menus' => true,
|
||||||
'menu_icon' => 'dashicons-businessman',
|
'show_in_menu' => 'edit.php?post_type=sp_player',
|
||||||
|
'show_in_admin_bar' => true,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user