Fix bugs, use plural post slugs, move actions and filters into hooks folder
This commit is contained in:
@@ -11,7 +11,7 @@ function sportspress_event_post_init() {
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'author', 'comments' ),
|
||||
'register_meta_box_cb' => 'sportspress_event_meta_init',
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_event_slug', 'event' ) ),
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_event_slug', 'events' ) ),
|
||||
'menu_icon' => 'dashicons-calendar',
|
||||
'capability_type' => 'sp_event'
|
||||
);
|
||||
|
||||
@@ -11,8 +11,9 @@ function sportspress_list_post_init() {
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'author' ),
|
||||
'register_meta_box_cb' => 'sportspress_list_meta_init',
|
||||
'rewrite' => array( 'slug' => 'list' ),
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_list_slug', 'lists' ) ),
|
||||
'show_in_menu' => 'edit.php?post_type=sp_player',
|
||||
'show_in_admin_bar' => true,
|
||||
'capability_type' => 'sp_list'
|
||||
);
|
||||
register_post_type( 'sp_list', $args );
|
||||
@@ -78,7 +79,7 @@ function sportspress_list_player_meta( $post ) {
|
||||
|
||||
function sportspress_list_stats_meta( $post ) {
|
||||
|
||||
list( $columns, $data, $placeholders, $merged ) = sportspress_get_list( $post->ID, true );
|
||||
list( $columns, $data, $placeholders, $merged ) = sportspress_get_player_list_data( $post->ID, true );
|
||||
|
||||
sportspress_edit_player_table( $columns, $data, $placeholders );
|
||||
sportspress_nonce();
|
||||
|
||||
@@ -11,7 +11,7 @@ function sportspress_player_post_init() {
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'author', 'thumbnail' ),
|
||||
'register_meta_box_cb' => 'sportspress_player_meta_init',
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_player_slug', 'player' ) ),
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_player_slug', 'players' ) ),
|
||||
'menu_icon' => 'dashicons-groups',
|
||||
'capability_type' => 'sp_player',
|
||||
);
|
||||
|
||||
@@ -11,8 +11,9 @@ function sportspress_table_post_init() {
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'author', 'excerpt' ),
|
||||
'register_meta_box_cb' => 'sportspress_table_meta_init',
|
||||
'rewrite' => array( 'slug' => 'table' ),
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_table_slug', 'tables' ) ),
|
||||
'show_in_menu' => 'edit.php?post_type=sp_team',
|
||||
'show_in_admin_bar' => true,
|
||||
// 'capability_type' => 'sp_table'
|
||||
);
|
||||
register_post_type( 'sp_table', $args );
|
||||
@@ -66,7 +67,7 @@ function sportspress_table_team_meta( $post, $test ) {
|
||||
|
||||
function sportspress_table_columns_meta( $post ) {
|
||||
|
||||
list( $columns, $data, $placeholders, $merged ) = sportspress_get_table( $post->ID, true );
|
||||
list( $columns, $data, $placeholders, $merged ) = sportspress_get_league_table_data( $post->ID, true );
|
||||
|
||||
sportspress_edit_league_table( $columns, $data, $placeholders );
|
||||
|
||||
|
||||
@@ -11,7 +11,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', 'team' ) ),
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_team_slug', 'teams' ) ),
|
||||
'menu_icon' => 'dashicons-shield-alt',
|
||||
'capability_type' => 'sp_team'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user