Skip to content

Commit 44f91e5

Browse files
authored
Fix: Fix Comment CLI (#1320)
1 parent 181d383 commit 44f91e5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

includes/class-cli.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
use WP_CLI;
1111
use WP_CLI_Command;
12+
use Activitypub\Scheduler\Post;
13+
use Activitypub\Scheduler\Comment;
1214

1315
/**
1416
* WP-CLI commands.
@@ -67,11 +69,11 @@ public function post( $args ) {
6769
switch ( $args[0] ) {
6870
case 'delete':
6971
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 );
7173
WP_CLI::success( '"Delete" activity is queued.' );
7274
break;
7375
case 'update':
74-
Scheduler\Post::schedule_post_activity( 'publish', 'publish', $post );
76+
Post::schedule_post_activity( 'publish', 'publish', $post );
7577
WP_CLI::success( '"Update" activity is queued.' );
7678
break;
7779
default:
@@ -117,11 +119,11 @@ public function comment( $args ) {
117119
switch ( $args[0] ) {
118120
case 'delete':
119121
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 );
121123
WP_CLI::success( '"Delete" activity is queued.' );
122124
break;
123125
case 'update':
124-
Scheduler::schedule_comment_activity( 'approved', 'approved', $args[1] );
126+
Comment::schedule_comment_activity( 'approved', 'approved', $comment );
125127
WP_CLI::success( '"Update" activity is queued.' );
126128
break;
127129
default:

0 commit comments

Comments
 (0)