Fix permissions, add post filters
This commit is contained in:
@@ -34,6 +34,7 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
|
||||
$team = get_post( $team_id );
|
||||
$outcome_slug = sportspress_array_value( sportspress_array_value( $results, $team_id, null ), 'outcome', null );
|
||||
|
||||
echo $team->post_title;
|
||||
if ( $outcome_slug && $outcome_slug != '-1' ):
|
||||
$args=array(
|
||||
'name' => $outcome_slug,
|
||||
@@ -43,10 +44,12 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
|
||||
);
|
||||
$outcomes = get_posts( $args );
|
||||
|
||||
echo $team->post_title . ( $outcomes ? ' — ' . $outcomes[0]->post_title : '' ) . '<br>';
|
||||
else:
|
||||
echo $team->post_title . '<br>';
|
||||
if ( sizeof( $outcomes ) ):
|
||||
$outcome = reset( $outcomes );
|
||||
echo ' — ' . $outcome->post_title;
|
||||
endif;
|
||||
endif;
|
||||
echo '<br>';
|
||||
endforeach;
|
||||
elseif ( $post_type == 'sp_player' ):
|
||||
$results = get_post_meta( $post_id, 'sp_results', true );
|
||||
|
||||
Reference in New Issue
Block a user