rebase from live enviornment

This commit is contained in:
Rachit Bhargava
2024-01-09 22:14:20 -05:00
parent ff0b49a046
commit 3a22fcaa4a
15968 changed files with 2344674 additions and 45234 deletions

View File

@@ -0,0 +1,52 @@
<?php
declare(strict_types=1);
namespace Imagify\CLI;
use Imagify\Bulk\Bulk;
/**
* Command class for the missing WebP generation
*/
class GenerateMissingWebpCommand extends AbstractCommand {
/**
* Executes the command.
*
* @param array $arguments Positional argument.
* @param array $options Optional arguments.
*/
public function __invoke( $arguments, $options ) {
Bulk::get_instance()->run_generate_webp( $arguments );
\WP_CLI::log( 'Imagify missing WebP generation triggered.' );
}
/**
* {@inheritdoc}
*/
protected function get_command_name(): string {
return 'generate-missing-webp';
}
/**
* {@inheritdoc}
*/
public function get_description(): string {
return 'Run the generation of the missing WebP versions';
}
/**
* {@inheritdoc}
*/
public function get_synopsis(): array {
return [
[
'type' => 'positional',
'name' => 'contexts',
'description' => 'The context(s) to run the missing WebP generation for. Possible values are wp and custom-folders.',
'optional' => false,
'repeating' => true,
],
];
}
}