Plugin Updates

This commit is contained in:
Tony Volpe
2024-03-19 15:33:31 +00:00
parent ff5b56dc44
commit 3a70a6e4bf
317 changed files with 8178 additions and 2933 deletions

View File

@@ -185,6 +185,32 @@ function imagify_path_to_webp( $path ) {
return $path . '.webp';
}
/**
* Convert a path (or URL) to its next-gen version.
* To keep the function simple:
* - Not tested if it's an image.
* - File existance is not tested.
* - If an URL is given, make sure it doesn't contain query args.
*
* @since 2.2
*
* @param string $path A file path or URL.
* @param string $format format we are targeting.
* @return string
*/
function imagify_path_to_nextgen( $path, string $format ) {
switch ( $format ) {
case 'webp':
$path = $path . '.webp';
break;
case 'avif':
$path = $path . '.avif';
break;
}
return $path;
}
/**
* Tell if the current user can optimize custom folders.
*