Create unserialized posts function

This commit is contained in:
Takumi
2013-07-25 17:19:21 +10:00
parent fb9e1731f1
commit aaa545e966
3 changed files with 31 additions and 12 deletions

View File

@@ -38,8 +38,8 @@ function sp_staff_edit_columns( $columns ) {
$columns = array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Name', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_position' => __( 'Positions', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_league' => __( 'Leagues', 'sportspress' ),
'sp_season' => __( 'Seasons', 'sportspress' )
);
@@ -57,6 +57,9 @@ function sp_staff_custom_columns( $column ) {
else
echo '—';
break;
case 'sp_team':
sp_unserialized_posts( $post_id, 'sp_teams', '', '<br />' );
break;
case 'sp_league':
if ( get_the_terms ( $post_id, 'sp_league' ) )
the_terms( $post_id, 'sp_league' );