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

@@ -59,17 +59,7 @@ function sp_player_custom_columns( $column, $post_id ) {
echo '—';
break;
case 'sp_team':
$teams = sp_get_teams( $post_id );
foreach ( $teams as $team ):
$parents = get_post_ancestors( $team );
$parents = array_combine( array_keys( $parents ), array_reverse( array_values( $parents ) ) );
foreach ( $parents as $parent ):
if ( !in_array( $parent, $teams ) )
edit_post_link( get_the_title( $parent ), '', ' ', $parent );
echo '— ';
endforeach;
edit_post_link( get_the_title( $team ), '', '<br />', $team );
endforeach;
sp_unserialized_posts( $post_id, 'sp_teams', '', '<br />' );
break;
case 'sp_league':
if ( get_the_terms ( $post_id, 'sp_league' ) )