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,35 +2,40 @@
/**
* Team Gallery Thumbnail
*
* @author ThemeBoy
* @package SportsPress/Templates
* @author ThemeBoy
* @package SportsPress/Templates
* @version 2.4
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
$defaults = array(
'id' => null,
'icontag' => 'dt',
'id' => null,
'icontag' => 'dt',
'captiontag' => 'dd',
'caption' => null,
'size' => 'sportspress-crop-medium',
'caption' => null,
'size' => 'sportspress-crop-medium',
'link_posts' => get_option( 'sportspress_link_teams', 'yes' ) == 'yes' ? true : false,
);
extract( $defaults, EXTR_SKIP );
// Add caption tag if has caption
if ( $captiontag && $caption )
if ( $captiontag && $caption ) {
$caption = '<' . $captiontag . ' class="wp-caption-text gallery-caption small-3 columns">' . wptexturize( $caption ) . '</' . $captiontag . '>';
}
if ( $link_posts )
if ( $link_posts ) {
$caption = '<a href="' . get_permalink( $id ) . '">' . $caption . '</a>';
}
if ( has_post_thumbnail( $id ) )
if ( has_post_thumbnail( $id ) ) {
$thumbnail = get_the_post_thumbnail( $id, $size );
else
} else {
$thumbnail = '<img width="150" height="150" src="//www.gravatar.com/avatar/?s=150&d=blank&f=y" class="attachment-thumbnail wp-post-image">';
}
echo "<{$itemtag} class='gallery-item'>";
echo "