Last active
April 25, 2018 00:09
-
-
Save JMWebDevelopment/54fbd76a3e456f88e79364ce45af422d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sports_bench_do_playoff_series( $html, $series, $team_one, $team_one_class, $team_one_name, $team_two, $team_two_class, $team_two_name, $game_numbers ) { | |
$html .= '<table>'; | |
$team_row_styles = apply_filters( 'sports_bench_playoff_team_row', '', $team_one ); | |
$html .= '<tr class="team-row" style="' . $team_row_styles . '">'; | |
$html .= '<td class="seed">' . $series->team_one_seed . '</td>'; | |
$html .= '<td class="logo">' . $team_one->get_team_photo( 'team-logo' ) . '</td>'; | |
$html .= '<td class="name ' . $team_one_class . '">' . $team_one_name . '</td>'; | |
$html .= '<td class="score">' . $series->get_team_score( 'team-one' ) . '</td>'; | |
$html .= '</tr>'; | |
$team_row_styles = apply_filters( 'sports_bench_playoff_team_row', '', $team_two ); | |
$html .= '<tr class="team-row" style="' . $team_row_styles . '">'; | |
$html .= '<td class="seed">' . $series->team_two_seed . '</td>'; | |
$html .= '<td class="logo">' . $team_two->get_team_photo( 'team-logo' ) . '</td>'; | |
$html .= '<td class="name' . $team_two_class . '">' . $team_two_name . '</td>'; | |
$html .= '<td class="score">' . $series->get_team_score( 'team-two' ) . '</td>'; | |
$html .= '</tr>'; | |
$html .= '<tr>'; | |
$html .= '<td class="series-details" colspan="3">' . $series->get_series_score() . '</td>'; | |
$theme = wp_get_theme(); | |
$parent_theme = $theme->parent(); | |
if ( $theme->name == 'Sports Bench' || ( $parent_theme && $parent_theme->name == 'Sports Bench' ) ) { | |
$html .= '<td class="series-details"><a data-open="series-' . $series->series_id . '">' . __( 'View', 'sports-bench' ) . '</a></td>'; | |
} | |
$html .= '</tr>'; | |
$html .= '</table>'; | |
$html .= apply_filters( 'sports_bench_playoff_series_modal', '', $series, $team_one, $team_one_name, $team_two, $team_two_name, $game_numbers ); | |
return $html; | |
} | |
add_filter( 'sports_bench_playoff_series', 'sports_bench_do_playoff_series', 10, 9 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment