views/noticias/wp-content/themes/ts-photography/inc/logo/logo-resizer.php
/* Helper function to determine the max size of the logo */
Helper function to determine the max size of the logo
Helper function to determine the max size of the logo
function ts_photography_min_max( $short, $long, $short_max, $long_max, $percent, $min ){
	$ratio = ( $long / $short );
	$max['long'] = ( $long_max >= $long ) ? $long : $long_max;
	$max['short'] = ( $short_max >= ( $max['long'] / $ratio ) ) ? floor( $max['long'] / $ratio ) : $short_max;
	$ppp = ( $max['short'] - $min ) / 100;
	$size['short'] = round( $min + ( $percent * $ppp ) );
	$size['long'] = round( $size['short'] / ( $short / $long ) );
	return $size;
}
function ts_photography_min_max ( $ short , $ long , $ short_max , $ long_max , $ percent , $ min ) { $ ratio = ( $ long / $ short ) ; $ max [ 'long' ] = ( $ long_max >= $ long ) ? $ long : $ long_max ; $ max [ 'short' ] = ( $ short_max >= ( $ max [ 'long' ] / $ ratio ) ) ? floor ( $ max [ 'long' ] / $ ratio ) : $ short_max ; $ ppp = ( $ max [ 'short' ] - $ min ) / 100 ; $ size [ 'short' ] = round ( $ min + ( $ percent * $ ppp ) ) ; $ size [ 'long' ] = round ( $ size [ 'short' ] / ( $ short / $ long ) ) ; return $ size ; }
Helper function to determine the max size of the logo
Helper function to determine the max size of the logo