Clean up spaces, tabs, indentation, and bracket formatting

This commit is contained in:
Brian Miyaji
2021-11-10 15:41:40 +09:00
parent e58beb1201
commit 3dff686a00
285 changed files with 29638 additions and 24147 deletions

View File

@@ -2,44 +2,49 @@
/**
* Team Details
*
* @author ThemeBoy
* @package SportsPress/Templates
* @author ThemeBoy
* @package SportsPress/Templates
* @version 2.7.1
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( get_option( 'sportspress_team_show_details', 'no' ) === 'no' ) return;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( get_option( 'sportspress_team_show_details', 'no' ) === 'no' ) {
return;
}
if ( ! isset( $id ) )
if ( ! isset( $id ) ) {
$id = get_the_ID();
}
$data = array();
$terms = get_the_terms( $id, 'sp_league' );
if ( $terms ):
if ( $terms ) :
$leagues = array();
foreach ( $terms as $term ):
foreach ( $terms as $term ) :
$leagues[] = $term->name;
endforeach;
$data[ __( 'Leagues', 'sportspress' ) ] = implode( ', ', $leagues );
endif;
$terms = get_the_terms( $id, 'sp_season' );
if ( $terms ):
if ( $terms ) :
$seasons = array();
foreach ( $terms as $term ):
foreach ( $terms as $term ) :
$seasons[] = $term->name;
endforeach;
$data[ __( 'Seasons', 'sportspress' ) ] = implode( ', ', $seasons );
endif;
$terms = get_the_terms( $id, 'sp_venue' );
if ( $terms ):
if ( get_option( 'sportspress_team_link_venues', 'no' ) === 'yes' ):
if ( $terms ) :
if ( get_option( 'sportspress_team_link_venues', 'no' ) === 'yes' ) :
$data[ __( 'Home', 'sportspress' ) ] = get_the_term_list( $id, 'sp_venue', '', ', ' );
else:
else :
$venues = array();
foreach ( $terms as $term ):
foreach ( $terms as $term ) :
$venues[] = $term->name;
endforeach;
$data[ __( 'Home', 'sportspress' ) ] = implode( ', ', $venues );
@@ -49,7 +54,7 @@ endif;
$output = '<div class="sp-list-wrapper">' .
'<dl class="sp-team-details">';
foreach( $data as $label => $value ):
foreach ( $data as $label => $value ) :
$output .= '<dt>' . $label . '</dt><dd>' . $value . '</dd>';