Hi,
There is an easy way to insert the stadium name. You would have to alter the code of the show_match_info
function to show it.
Note: a disadvantage of changing the plugin’s code is that you would have to change the code again after every upgrade of the plugin.
Changed function code:
public function show_match_info( $info ) {
$output = '';
$this->stats_visible = false;
$matches = new Football_Pool_Matches;
if ( count( $info ) > 0 ) {
if ( $matches->always_show_predictions || $info['match_is_editable'] == false ) {
$output .= sprintf( '<h2>%s - %s', $info['home_team'], $info['away_team'] );
if ( is_integer( $info['home_score'] ) && is_integer( $info['away_score'] ) ) {
$output .= sprintf( ' (%d - %d)', $info['home_score'], $info['away_score'] );
}
$output .= '</h2>';
$output .= sprintf( '<h3 class="stadium-name">%s</h3>', $info['stadium_name'] );
$this->stats_visible = true;
} else {
$output .= sprintf( '<h2>%s - %s</h2>', $info['home_team'], $info['away_team'] );
$output .= sprintf( '<h3 class="stadium-name">%s</h3>', $info['stadium_name'] );
$output .= sprintf( '<p>%s</p>', __( 'This data is not (yet) available.', FOOTBALLPOOL_TEXT_DOMAIN ) );
}
} else {
$output .= sprintf( '<p>%s</p>', __( 'This data is not (yet) available.', FOOTBALLPOOL_TEXT_DOMAIN ) );
}
return $output;
}
It’s located in the classes\class-football-pool-statistics.php file.