/** * This is just a tiny wrapper function for the class above so that there is no * need to change any code in your own WP themes. Usage is still the same :) */ function ut_resize($url, $width = null, $height = null, $crop = null, $single = true, $upscale = false) { $ut_resize = UT_Resize::getInstance(); return $ut_resize->process($url, $width, $height, $crop, $single, $upscale); }
function ut_resize($url, $width = null, $height = null, $crop = null, $single = true, $upscale = false) { if (class_exists('Jetpack') && Jetpack::is_module_active('photon')) { $args = array('resize' => "{$width},{$height}"); return jetpack_photon_url($src, $args); } else { $ut_resize = UT_Resize::getInstance(); return $ut_resize->process($url, $width, $height, $crop, $single, $upscale); } }