Add option to display match day in event details

This commit is contained in:
Brian Miyaji
2016-09-01 22:03:10 +10:00
parent 28da7724b6
commit 1033aaf375
2 changed files with 113 additions and 91 deletions

View File

@@ -38,6 +38,13 @@ foreach ( $taxonomies as $taxonomy => $post_type ):
endif;
endforeach;
if ( 'yes' === get_option( 'sportspress_event_show_day', 'yes' ) ) {
$day = get_post_meta( $id, 'sp_day', true );
if ( '' !== $day ) {
$data[ __( 'Match Day', 'sportspress' ) ] = $day;
}
}
$data = apply_filters( 'sportspress_event_details', $data, $id );
if ( ! sizeof( $data ) ) return;