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 ): if ( 2 == strlen( $nationality ) ): $legacy = SP()->countries->legacy; $nationality = strtolower( $nationality ); $nationality = sp_array_value( $legacy, $nationality, null ); endif; $country_name = sp_array_value( $countries, $nationality, null ); $data[ __( 'Nationality', 'sportspress' ) ] = $country_name ? ( $show_nationality_flags ? '' . $nationality . ' ' : '' ) . $country_name : '—'; endif; if ( $current_team ) $data[ __( 'Current Team', 'sportspress' ) ] = '' . get_the_title( $current_team ) . ''; if ( $past_teams ): $teams = array(); foreach ( $past_teams as $team ): $teams[] = '' . get_the_title( $team ) . ''; endforeach; $data[ __( 'Past Teams', 'sportspress' ) ] = implode( ', ', $teams ); endif; $data = apply_filters( 'sportspress_staff_details', $data, $id ); $output = '
' . '
'; foreach( $data as $label => $value ): $output .= '
' . $label . '
' . $value . '
'; endforeach; $output .= '
'; ?>