diff --git a/includes/admin/post-types/class-sp-admin-cpt-list.php b/includes/admin/post-types/class-sp-admin-cpt-list.php index 257f872d..c1d2d021 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-list.php +++ b/includes/admin/post-types/class-sp-admin-cpt-list.php @@ -62,8 +62,13 @@ class SP_Admin_CPT_List extends SP_Admin_CPT { public function custom_columns( $column, $post_id ) { switch ( $column ): case 'sp_player': - $players = array_filter( get_post_meta( $post_id, 'sp_player' ) ); - echo sizeof( $players ); + $select = get_post_meta( $post_id, 'sp_select', true ); + if ( 'manual' == $select ): + $players = array_filter( get_post_meta( $post_id, 'sp_player' ) ); + echo sizeof( $players ); + else: + _e( 'Auto', 'sportspress' ); + endif; break; case 'sp_league': echo get_the_terms ( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : __( 'All', 'sportspress' ); diff --git a/includes/admin/post-types/class-sp-admin-cpt-table.php b/includes/admin/post-types/class-sp-admin-cpt-table.php index 5890f6da..08e680b8 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-table.php +++ b/includes/admin/post-types/class-sp-admin-cpt-table.php @@ -66,8 +66,13 @@ class SP_Admin_CPT_Table extends SP_Admin_CPT { echo get_the_terms ( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : '—'; break; case 'sp_team': - $teams = array_filter( get_post_meta( $post_id, 'sp_team' ) ); - echo sizeof( $teams ); + $select = get_post_meta( $post_id, 'sp_select', true ); + if ( 'manual' == $select ): + $teams = array_filter( get_post_meta( $post_id, 'sp_team' ) ); + echo sizeof( $teams ); + else: + _e( 'Auto', 'sportspress' ); + endif; break; endswitch; }