HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/shootinschool/wp-content/themes/shootinschool/sportspress/player-photo.php
<?php
/**
 * Player Photo
 *
 * @author 		ThemeBoy
 * @package 	SportsPress/Templates
 * @version     1.4
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

?>
	<?php
	if ( get_option( 'sportspress_player_show_photo', 'yes' ) === 'no' ) return;

	if ( ! isset( $id ) )
		$id = get_the_ID();

	if ( has_post_thumbnail( $id ) ):
		?>
		<div class="sp-template sp-template-player-photo sp-template-photo sp-player-photo">
			<?php
			$size = 'stm-270-370';
			if(is_layout("af") || is_layout('baseball')) $size = 'stm-445-400';
			elseif (is_layout("sccr")) $size = 'player_photo';
			
			echo get_the_post_thumbnail( $id, $size );
			?>
			
			<?php
			$playerNumber = sp_get_player_number($id);
			if(is_layout("sccr") && $playerNumber != ""){
				echo '<div class="number"><i class="icon-soccer_ico_tshirt"></i>' . esc_html( $playerNumber ). '</div>';
			}
			?>
		</div>
		<?php
	endif;