null,
'performance' => array(),
'icontag' => 'dt',
'captiontag' => 'dd',
'caption' => null,
'size' => 'gallery',
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
);
extract( $defaults, EXTR_SKIP );
// Add player number to caption if available
$player_number = get_post_meta( $id, 'sp_number', true );
if ( $player_number )
$caption = '' . $player_number . ' ' . $caption;
// Add caption tag if has caption
if ( $captiontag && $caption )
$caption = '<' . $captiontag . ' class="wp-caption-text gallery-caption small-3 columns' . ( $player_number ? ' has-number' : '' ) . '">' . wptexturize( $caption ) . '' . $captiontag . '>';
if ( $link_posts )
$caption = '' . $caption . '';
if ( isset( $limit ) && $i >= $limit )
continue;
if ( has_post_thumbnail( $id ) )
$thumbnail = get_the_post_thumbnail( $id, $size );
else
$thumbnail = '
';
echo "<{$itemtag} class='gallery-item'>";
echo "
<{$icontag} class='gallery-icon portrait'>"
. '' . $thumbnail . ''
. "{$icontag}>";
echo $caption;
echo "{$itemtag}>";