Update player gallery thumbnail markup

This commit is contained in:
Brian Miyaji
2014-12-09 18:11:52 +11:00
parent d77bcaa605
commit f1711134f3
2 changed files with 15 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ if ( $player_number )
// Add caption tag if has caption // 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 . '>'; $caption = '<' . $captiontag . ' class="wp-caption-text gallery-caption small-3 columns' . ( $player_number ? ' has-number' : '' ) . '">' . wptexturize( $caption ) . '</' . $captiontag . '>';
if ( $link_posts ) if ( $link_posts )
$caption = '<a href="' . get_permalink( $id ) . '">' . $caption . '</a>'; $caption = '<a href="' . get_permalink( $id ) . '">' . $caption . '</a>';

View File

@@ -4,11 +4,12 @@
* *
* @author ThemeBoy * @author ThemeBoy
* @package SportsPress/Templates * @package SportsPress/Templates
* @version 1.1 * @version 1.5
*/ */
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
$html5 = current_theme_supports( 'html5', 'gallery' );
$defaults = array( $defaults = array(
'id' => get_the_ID(), 'id' => get_the_ID(),
'number' => -1, 'number' => -1,
@@ -69,7 +70,7 @@ else:
endif; endif;
$gallery_style = $gallery_div = ''; $gallery_style = $gallery_div = '';
if ( apply_filters( 'use_default_gallery_style', true ) ) if ( apply_filters( 'use_default_gallery_style', ! $html5 ) )
$gallery_style = " $gallery_style = "
<style type='text/css'> <style type='text/css'>
#{$selector} { #{$selector} {
@@ -139,13 +140,20 @@ echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
endif; endforeach; endif; endforeach;
echo '<br style="clear: both;" />'; if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
echo '<br style="clear: both" />';
}
endforeach; endforeach;
echo "</div>\n"; if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
echo '<br style="clear: both" />';
}
if ( $show_all_players_link ) if ( $show_all_players_link ) {
echo '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a>'; echo '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a>';
}
echo "</div>\n";
?> ?>
</div> </div>