Action
1 year ago
ActionScheduler_WPCLI_Clean_Command.php
1 year ago
ActionScheduler_WPCLI_QueueRunner.php
1 year ago
ActionScheduler_WPCLI_Scheduler_command.php
1 year ago
Action_Command.php
1 year ago
Migration_Command.php
1 year ago
ProgressBar.php
1 year ago
System_Command.php
1 year ago
index.php
3 years ago
Action_Command.php
50 lines
| 1 | <?php |
| 2 | namespace Action_Scheduler\WP_CLI; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | class Action_Command extends \WP_CLI_Command { |
| 5 | public function cancel( array $args, array $assoc_args ) { |
| 6 | require_once 'Action/Cancel_Command.php'; |
| 7 | $command = new Action\Cancel_Command( $args, $assoc_args ); |
| 8 | $command->execute(); |
| 9 | } |
| 10 | public function create( array $args, array $assoc_args ) { |
| 11 | require_once 'Action/Create_Command.php'; |
| 12 | $command = new Action\Create_Command( $args, $assoc_args ); |
| 13 | $command->execute(); |
| 14 | } |
| 15 | public function delete( array $args, array $assoc_args ) { |
| 16 | require_once 'Action/Delete_Command.php'; |
| 17 | $command = new Action\Delete_Command( $args, $assoc_args ); |
| 18 | $command->execute(); |
| 19 | } |
| 20 | public function generate( array $args, array $assoc_args ) { |
| 21 | require_once 'Action/Generate_Command.php'; |
| 22 | $command = new Action\Generate_Command( $args, $assoc_args ); |
| 23 | $command->execute(); |
| 24 | } |
| 25 | public function get( array $args, array $assoc_args ) { |
| 26 | require_once 'Action/Get_Command.php'; |
| 27 | $command = new Action\Get_Command( $args, $assoc_args ); |
| 28 | $command->execute(); |
| 29 | } |
| 30 | public function subcommand_list( array $args, array $assoc_args ) { |
| 31 | require_once 'Action/List_Command.php'; |
| 32 | $command = new Action\List_Command( $args, $assoc_args ); |
| 33 | $command->execute(); |
| 34 | } |
| 35 | public function logs( array $args ) { |
| 36 | $command = sprintf( 'action-scheduler action get %d --field=log_entries', $args[0] ); |
| 37 | WP_CLI::runcommand( $command ); |
| 38 | } |
| 39 | public function next( array $args, array $assoc_args ) { |
| 40 | require_once 'Action/Next_Command.php'; |
| 41 | $command = new Action\Next_Command( $args, $assoc_args ); |
| 42 | $command->execute(); |
| 43 | } |
| 44 | public function run( array $args, array $assoc_args ) { |
| 45 | require_once 'Action/Run_Command.php'; |
| 46 | $command = new Action\Run_Command( $args, $assoc_args ); |
| 47 | $command->execute(); |
| 48 | } |
| 49 | } |
| 50 |