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' );
|
$submenu['edit.php?post_type=sp_player'] = array_filter( $submenu['edit.php?post_type=sp_player'], 'sportspress_admin_menu_remove_seasons' );
|
||||||
endif;
|
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' );
|
add_action( 'admin_menu', 'sportspress_admin_menu' );
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
function sportspress_player_post_init() {
|
function sportspress_player_post_init() {
|
||||||
$labels = array(
|
$labels = array(
|
||||||
'name' => __( 'Players', 'sportspress' ),
|
'name' => __( 'Roster', 'sportspress' ),
|
||||||
'singular_name' => __( 'Player', 'sportspress' ),
|
'singular_name' => __( 'Player', 'sportspress' ),
|
||||||
|
'all_items' => __( 'Players', 'sportspress' ),
|
||||||
'add_new_item' => __( 'Add New', 'sportspress' ),
|
'add_new_item' => __( 'Add New', 'sportspress' ),
|
||||||
'edit_item' => __( 'Edit', 'sportspress' ),
|
'edit_item' => __( 'Edit', 'sportspress' ),
|
||||||
'new_item' => __( 'New', 'sportspress' ),
|
'new_item' => __( 'New', 'sportspress' ),
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ function sportspress_staff_post_init() {
|
|||||||
'supports' => array( 'title', 'author', 'thumbnail' ),
|
'supports' => array( 'title', 'author', 'thumbnail' ),
|
||||||
'register_meta_box_cb' => 'sportspress_staff_meta_init',
|
'register_meta_box_cb' => 'sportspress_staff_meta_init',
|
||||||
'rewrite' => array( 'slug' => get_option( 'sp_staff_slug', 'staff' ) ),
|
'rewrite' => array( 'slug' => get_option( 'sp_staff_slug', 'staff' ) ),
|
||||||
|
'show_in_menu' => 'edit.php?post_type=sp_player',
|
||||||
'menu_icon' => 'dashicons-businessman',
|
'menu_icon' => 'dashicons-businessman',
|
||||||
'capability_type' => 'sp_staff'
|
'capability_type' => 'sp_staff'
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user