get_option( 'sportspress_staff_show_flags', 'yes' ) == 'yes' ? true : false, ); extract( $defaults, EXTR_SKIP ); $countries = SP()->countries->countries; $staff = new SP_Staff( $id ); $nationality = $staff->nationality; $current_team = $staff->current_team; $past_teams = $staff->past_teams(); $data = array(); if ( $nationality ): $country_name = sp_array_value( $countries, $nationality, null ); $data[ SP()->text->string('Nationality') ] = $country_name ? ( $show_nationality_flags ? '' . $nationality . ' ' : '' ) . $country_name : '—'; endif; if ( $current_team ) $data[ SP()->text->string('Current Team') ] = '' . get_the_title( $current_team ) . ''; if ( $past_teams ): $teams = array(); foreach ( $past_teams as $team ): $teams[] = '' . get_the_title( $team ) . ''; endforeach; $data[ SP()->text->string('Past Teams') ] = implode( ', ', $teams ); endif; $output = '
' . '
'; foreach( $data as $label => $value ): $output .= '
' . $label . '
' . $value . '
'; endforeach; $output .= '
'; echo apply_filters( 'sportspress_staff_details', $output );