Add permalink options

This commit is contained in:
Brian Miyaji
2014-03-18 21:27:37 +11:00
parent 124387e53b
commit 8112484074
14 changed files with 84 additions and 12 deletions

View File

@@ -19,7 +19,7 @@ function sportspress_calendar_post_init() {
'hierarchical' => false,
'supports' => array( 'title', 'author', 'thumbnail' ),
'register_meta_box_cb' => 'sportspress_calendar_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_calendar_slug', 'calendar' ) ),
'rewrite' => array( 'slug' => get_option( 'sportspress_calendar_slug', 'calendar' ) ),
'show_in_menu' => 'edit.php?post_type=sp_event',
'show_in_admin_bar' => true,
'capability_type' => 'sp_calendar'

View File

@@ -19,7 +19,7 @@ function sportspress_directory_post_init() {
'hierarchical' => false,
'supports' => array( 'title', 'author', 'thumbnail' ),
'register_meta_box_cb' => 'sportspress_directory_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_directory_slug', 'list' ) ),
'rewrite' => array( 'slug' => get_option( 'sportspress_directory_slug', 'directory' ) ),
'show_in_menu' => 'edit.php?post_type=sp_player',
'show_in_admin_bar' => true,
'capability_type' => 'sp_directory'

View File

@@ -20,7 +20,7 @@ function sportspress_event_post_init() {
'hierarchical' => false,
'supports' => array( 'title', 'author', 'thumbnail', 'comments' ),
'register_meta_box_cb' => 'sportspress_event_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_event_slug', 'events' ) ),
'rewrite' => array( 'slug' => get_option( 'sportspress_events_slug', 'events' ) ),
'menu_icon' => 'dashicons-calendar',
'capability_type' => 'sp_event'
);

View File

@@ -19,7 +19,7 @@ function sportspress_list_post_init() {
'hierarchical' => false,
'supports' => array( 'title', 'author', 'thumbnail' ),
'register_meta_box_cb' => 'sportspress_list_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_list_slug', 'list' ) ),
'rewrite' => array( 'slug' => get_option( 'sportspress_list_slug', 'list' ) ),
'show_in_menu' => 'edit.php?post_type=sp_player',
'show_in_admin_bar' => true,
'capability_type' => 'sp_list'

View File

@@ -21,7 +21,7 @@ function sportspress_player_post_init() {
'hierarchical' => false,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'page-attributes' ),
'register_meta_box_cb' => 'sportspress_player_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_player_slug', 'players' ) ),
'rewrite' => array( 'slug' => get_option( 'sportspress_players_slug', 'players' ) ),
'menu_icon' => 'dashicons-groups',
'capability_type' => 'sp_player',
);

View File

@@ -19,7 +19,7 @@ function sportspress_staff_post_init() {
'hierarchical' => false,
'supports' => array( 'title', 'author', 'thumbnail' ),
'register_meta_box_cb' => 'sportspress_staff_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_staff_slug', 'staff' ) ),
'rewrite' => array( 'slug' => get_option( 'sportspress_staff_slug', 'staff' ) ),
'show_in_menu' => 'edit.php?post_type=sp_player',
'capability_type' => 'sp_staff'
);

View File

@@ -19,7 +19,7 @@ function sportspress_table_post_init() {
'hierarchical' => false,
'supports' => array( 'title', 'author', 'thumbnail' ),
'register_meta_box_cb' => 'sportspress_table_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_table_slug', 'table' ) ),
'rewrite' => array( 'slug' => get_option( 'sportspress_table_slug', 'table' ) ),
'show_in_menu' => 'edit.php?post_type=sp_team',
'show_in_admin_bar' => true,
'capability_type' => 'sp_table'

View File

@@ -20,7 +20,7 @@ function sportspress_team_post_init() {
'hierarchical' => true,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ),
'register_meta_box_cb' => 'sportspress_team_meta_init',
'rewrite' => array( 'slug' => get_option( 'sp_team_slug', 'teams' ) ),
'rewrite' => array( 'slug' => get_option( 'sportspress_teams_slug', 'teams' ) ),
'menu_icon' => 'dashicons-shield-alt',
'capability_type' => 'sp_team'
);