|
9 | 9 |
|
10 | 10 | use WP_CLI; |
11 | 11 | use WP_CLI_Command; |
| 12 | +use Activitypub\Scheduler\Post; |
| 13 | +use Activitypub\Scheduler\Comment; |
12 | 14 |
|
13 | 15 | /** |
14 | 16 | * WP-CLI commands. |
@@ -67,11 +69,11 @@ public function post( $args ) { |
67 | 69 | switch ( $args[0] ) { |
68 | 70 | case 'delete': |
69 | 71 | WP_CLI::confirm( 'Do you really want to delete the (Custom) Post with the ID: ' . $args[1] ); |
70 | | - Scheduler\Post::schedule_post_activity( 'trash', 'publish', $post ); |
| 72 | + Post::schedule_post_activity( 'trash', 'publish', $post ); |
71 | 73 | WP_CLI::success( '"Delete" activity is queued.' ); |
72 | 74 | break; |
73 | 75 | case 'update': |
74 | | - Scheduler\Post::schedule_post_activity( 'publish', 'publish', $post ); |
| 76 | + Post::schedule_post_activity( 'publish', 'publish', $post ); |
75 | 77 | WP_CLI::success( '"Update" activity is queued.' ); |
76 | 78 | break; |
77 | 79 | default: |
@@ -117,11 +119,11 @@ public function comment( $args ) { |
117 | 119 | switch ( $args[0] ) { |
118 | 120 | case 'delete': |
119 | 121 | WP_CLI::confirm( 'Do you really want to delete the Comment with the ID: ' . $args[1] ); |
120 | | - Scheduler::schedule_comment_activity( 'trash', 'approved', $args[1] ); |
| 122 | + Comment::schedule_comment_activity( 'trash', 'approved', $comment ); |
121 | 123 | WP_CLI::success( '"Delete" activity is queued.' ); |
122 | 124 | break; |
123 | 125 | case 'update': |
124 | | - Scheduler::schedule_comment_activity( 'approved', 'approved', $args[1] ); |
| 126 | + Comment::schedule_comment_activity( 'approved', 'approved', $comment ); |
125 | 127 | WP_CLI::success( '"Update" activity is queued.' ); |
126 | 128 | break; |
127 | 129 | default: |
|
0 commit comments