Display players and staff under Roster menu group
This commit is contained in:
@@ -32,12 +32,6 @@ function sportspress_admin_menu( $position ) {
|
||||
$submenu['edit.php?post_type=sp_player'] = array_filter( $submenu['edit.php?post_type=sp_player'], 'sportspress_admin_menu_remove_seasons' );
|
||||
endif;
|
||||
|
||||
// Remove "Leagues" and "Seasons" links from Staff submenu
|
||||
if ( isset( $submenu['edit.php?post_type=sp_staff'] ) ):
|
||||
$submenu['edit.php?post_type=sp_staff'] = array_filter( $submenu['edit.php?post_type=sp_staff'], 'sportspress_admin_menu_remove_leagues' );
|
||||
$submenu['edit.php?post_type=sp_staff'] = array_filter( $submenu['edit.php?post_type=sp_staff'], 'sportspress_admin_menu_remove_seasons' );
|
||||
endif;
|
||||
|
||||
}
|
||||
add_action( 'admin_menu', 'sportspress_admin_menu' );
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
function sportspress_player_post_init() {
|
||||
$labels = array(
|
||||
'name' => __( 'Players', 'sportspress' ),
|
||||
'name' => __( 'Roster', 'sportspress' ),
|
||||
'singular_name' => __( 'Player', 'sportspress' ),
|
||||
'all_items' => __( 'Players', 'sportspress' ),
|
||||
'add_new_item' => __( 'Add New', 'sportspress' ),
|
||||
'edit_item' => __( 'Edit', 'sportspress' ),
|
||||
'new_item' => __( 'New', 'sportspress' ),
|
||||
|
||||
@@ -20,6 +20,7 @@ function sportspress_staff_post_init() {
|
||||
'supports' => array( 'title', 'author', 'thumbnail' ),
|
||||
'register_meta_box_cb' => 'sportspress_staff_meta_init',
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_staff_slug', 'staff' ) ),
|
||||
'show_in_menu' => 'edit.php?post_type=sp_player',
|
||||
'menu_icon' => 'dashicons-businessman',
|
||||
'capability_type' => 'sp_staff'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user