public static function upload( $url, $filename ) {

		$dir = wp_upload_dir();

		if ( ! isset( $dir['path'], $dir['basedir'] ) ) {
			return false;
		}

		$path = wp_mkdir_p( $dir['path'] ) ? $dir['path'] : $dir['basedir'];
		$path = rtrim( $path, '/' ) . '/';

		$image_data = @file_get_contents( $url );

		if ( $image_data ) {
			$state = @file_put_contents( $path . $filename, $image_data );
		}

		return ( isset( $state ) && $state ) ? $path . $filename : false;
	}