lib/ImageHelper.php
public static function get_sideloaded_file_loc( $file ) {
		$upload = wp_upload_dir();
		$dir = $upload['path'];
		$filename = $file;
		$file = parse_url($file);
		$path_parts = pathinfo($file['path']);
		$basename = md5($filename);
		$ext = 'jpg';
		if ( isset($path_parts['extension']) ) {
			$ext = $path_parts['extension'];
		}
		return $dir.'/'.$basename.'.'.$ext;
	}
public static function get_sideloaded_file_loc( $file ) {
		$upload = wp_upload_dir();
		$dir = $upload['path'];
		$filename = $file;
		$file = parse_url($file);
		$path_parts = pathinfo($file['path']);
		$basename = md5($filename);
		$ext = 'jpg';
		if ( isset($path_parts['extension']) ) {
			$ext = $path_parts['extension'];
		}
		return $dir.'/'.$basename.'.'.$ext;
	}
public static function get_sideloaded_file_loc ( $ file ) { $ upload = wp_upload_dir ( ) ; $ dir = $ upload [ 'path' ] ; $ filename = $ file ; $ file = parse_url ( $ file ) ; $ path_parts = pathinfo ( $ file [ 'path' ] ) ; $ basename = md5 ( $ filename ) ; $ ext = 'jpg' ; if ( isset ( $ path_parts [ 'extension' ] ) ) { $ ext = $ path_parts [ 'extension' ] ; } return $ dir . '/' . $ basename . '.' . $ ext ; }
Determines the filepath where a given external file will be stored.

@param string  $file
@return string
Determines the filepath where a given external file will be stored .