Use dashicons for custom post types

This commit is contained in:
Brian Miyaji
2013-12-31 00:12:31 +11:00
parent 51bf14e85d
commit 037d001494
5 changed files with 5 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ function sp_event_cpt_init() {
'supports' => array( 'title', 'author', 'comments' ), 'supports' => array( 'title', 'author', 'comments' ),
'register_meta_box_cb' => 'sp_event_meta_init', 'register_meta_box_cb' => 'sp_event_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_event_slug', 'event' ) ), 'rewrite' => array( 'slug' => get_option( 'sp_event_slug', 'event' ) ),
'menu_icon' => 'dashicons-calendar',
'capability_type' => 'sp_event' 'capability_type' => 'sp_event'
); );
register_post_type( 'sp_event', $args ); register_post_type( 'sp_event', $args );

View File

@@ -12,6 +12,7 @@ function sp_player_cpt_init() {
'supports' => array( 'title', 'author', 'thumbnail' ), 'supports' => array( 'title', 'author', 'thumbnail' ),
'register_meta_box_cb' => 'sp_player_meta_init', 'register_meta_box_cb' => 'sp_player_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_player_slug', 'player' ) ), 'rewrite' => array( 'slug' => get_option( 'sp_player_slug', 'player' ) ),
'menu_icon' => 'dashicons-groups',
'capability_type' => 'sp_player' 'capability_type' => 'sp_player'
); );
register_post_type( 'sp_player', $args ); register_post_type( 'sp_player', $args );

View File

@@ -12,6 +12,7 @@ function sp_staff_cpt_init() {
'supports' => array( 'title', 'author', 'thumbnail' ), 'supports' => array( 'title', 'author', 'thumbnail' ),
'register_meta_box_cb' => 'sp_staff_meta_init', 'register_meta_box_cb' => 'sp_staff_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_staff_slug', 'staff' ) ), 'rewrite' => array( 'slug' => get_option( 'sp_staff_slug', 'staff' ) ),
'menu_icon' => 'dashicons-businessman',
'capability_type' => 'sp_staff' 'capability_type' => 'sp_staff'
); );
register_post_type( 'sp_staff', $args ); register_post_type( 'sp_staff', $args );

View File

@@ -12,6 +12,7 @@ function sp_team_cpt_init() {
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ), 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ),
'register_meta_box_cb' => 'sp_team_meta_init', 'register_meta_box_cb' => 'sp_team_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_team_slug', 'team' ) ), 'rewrite' => array( 'slug' => get_option( 'sp_team_slug', 'team' ) ),
'menu_icon' => 'dashicons-shield-alt',
'capability_type' => 'sp_team' 'capability_type' => 'sp_team'
); );
register_post_type( 'sp_team', $args ); register_post_type( 'sp_team', $args );

View File

@@ -8,6 +8,7 @@
#adminmenu #menu-posts-sp_tournament div.wp-menu-image, #adminmenu #menu-posts-sp_tournament div.wp-menu-image,
#adminmenu #menu-posts-sp_venue div.wp-menu-image { #adminmenu #menu-posts-sp_venue div.wp-menu-image {
background-image: url(../images/menu.png); background-image: url(../images/menu.png);
background-image: none;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 1px -33px; background-position: 1px -33px;
} }