Skip to content

Commit

Permalink
update text
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona committed Feb 24, 2024
1 parent 770c25f commit 0103815
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions classes/Bulk/Bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function run_optimize( string $context, int $optimization_level ) {
}

/**
* Runs the WebP generation
* Runs the next-gen generation
*
* @param array $contexts An array of contexts (WP/Custom folders).
* @param array $formats An array of format to generate.
Expand All @@ -249,7 +249,7 @@ public function run_generate_nextgen( array $contexts, array $formats ) {
foreach ( $formats as $format ) {
$media = $this->get_bulk_instance( $context )->get_optimized_media_ids_without_format( $format );
if ( ! $media['ids'] && $media['errors']['no_backup'] ) {
// No backup, no WebP.
// No backup, no next-gen.
return [
'success' => false,
'message' => 'no-backup',
Expand Down Expand Up @@ -286,7 +286,7 @@ public function run_generate_nextgen( array $contexts, array $formats ) {
'id' => $media_id,
'context' => $context,
],
"imagify-{$context}-convert-webp"
"imagify-{$context}-convert-nextgen"
);
} catch ( Exception $exception ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
// nothing to do.
Expand Down Expand Up @@ -389,7 +389,7 @@ private function force_optimize( int $media_id, string $context, int $level ) {
}

/**
* Generate WebP images if they are missing.
* Generate next-gen images if they are missing.
*
* @since 2.1
*
Expand Down
2 changes: 1 addition & 1 deletion classes/Job/MediaOptimization.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private function task_optimize( $item ) {
$item['error'] = $data;

} elseif ( 'already_optimized' === $data['status'] ) {
// Status is "already_optimized", try to create WebP versions only.
// Status is "already_optimized", try to create next-gen versions only.
$item['sizes'] = array_filter( $item['sizes'], [ $this->optimization_process, 'is_size_next_gen' ] );

} elseif ( 'success' !== $data['status'] ) {
Expand Down
2 changes: 1 addition & 1 deletion classes/Optimization/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public function backup( $backup_path = null, $backup_source = null ) {
* @type bool $backup False to prevent backup. True to follow the user's setting. A backup can't be forced.
* @type string $backup_path If a backup must be done, this is the path to use. Default is the backup path used for the WP Media Library.
* @type int $optimization_level The optimization level (2=ultra, 1=aggressive, 0=normal).
* @type string $convert Set to 'webp' to convert the image to WebP.
* @type string $convert Set to 'webp' to convert the image to WebP, 'avif' to convert image to AVIF.
* @type string $context The context.
* @type int $original_size The file size, sent to the API.
* }
Expand Down

0 comments on commit 0103815

Please sign in to comment.