Add medium crop image size to ensure gallery images are square
This commit is contained in:
@@ -316,6 +316,7 @@ final class SportsPress {
|
||||
}
|
||||
|
||||
// Add image sizes
|
||||
add_image_size( 'sportspress-crop-medium', 300, 300, true );
|
||||
add_image_size( 'sportspress-fit-medium', 300, 300, false );
|
||||
add_image_size( 'sportspress-fit-icon', 128, 128, false );
|
||||
add_image_size( 'sportspress-fit-mini', 32, 32, false );
|
||||
|
||||
@@ -14,7 +14,7 @@ $defaults = array(
|
||||
'icontag' => 'dt',
|
||||
'captiontag' => 'dd',
|
||||
'caption' => null,
|
||||
'size' => 'medium',
|
||||
'size' => 'sportspress-crop-medium',
|
||||
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
||||
);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ $defaults = array(
|
||||
'captiontag' => 'dd',
|
||||
'grouptag' => 'h4',
|
||||
'columns' => 3,
|
||||
'size' => 'medium',
|
||||
'size' => 'sportspress-crop-medium',
|
||||
'show_all_players_link' => false,
|
||||
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@ if ( ! isset( $id ) )
|
||||
if ( has_post_thumbnail( $id ) ):
|
||||
?>
|
||||
<div class="sp-template sp-template-player-photo sp-template-photo sp-player-photo">
|
||||
<?php echo get_the_post_thumbnail( $id, 'medium' ); ?>
|
||||
<?php echo get_the_post_thumbnail( $id, 'sportspress-fit-medium' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
@@ -16,7 +16,7 @@ if ( ! isset( $id ) )
|
||||
if ( has_post_thumbnail( $id ) ):
|
||||
?>
|
||||
<div class="sp-template sp-template-staff-photo sp-template-photo sp-staff-photo">
|
||||
<?php echo get_the_post_thumbnail( $id, 'medium' ); ?>
|
||||
<?php echo get_the_post_thumbnail( $id, 'sportspress-fit-medium' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
Reference in New Issue
Block a user