Skip to content

Commit 7c26b4b

Browse files
jsitpfefferle
andauthored
Fix CLI scheduler function (#1316)
* Fix CLI scheduler function * Add changelog --------- Co-authored-by: Matthias Pfefferle <[email protected]>
1 parent f695734 commit 7c26b4b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323

2424
* Enforce 200 status header for valid ActivityPub requests.
2525
* Integration of content-visibility setup in the block editor.
26+
* Update CLI commands to the new scheduler refactorings.
2627

2728
## [5.1.0] - 2025-02-06
2829

includes/class-cli.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ public function post( $args ) {
6767
switch ( $args[0] ) {
6868
case 'delete':
6969
WP_CLI::confirm( 'Do you really want to delete the (Custom) Post with the ID: ' . $args[1] );
70-
Scheduler::schedule_post_activity( 'trash', 'publish', $args[1] );
70+
Scheduler\Post::schedule_post_activity( 'trash', 'publish', $post );
7171
WP_CLI::success( '"Delete" activity is queued.' );
7272
break;
7373
case 'update':
74-
Scheduler::schedule_post_activity( 'publish', 'publish', $args[1] );
74+
Scheduler\Post::schedule_post_activity( 'publish', 'publish', $post );
7575
WP_CLI::success( '"Update" activity is queued.' );
7676
break;
7777
default:

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ For reasons of data protection, it is not possible to see the followers of other
139139
* Changed: Updated terminology to be client-neutral in the Federated Reply block.
140140
* Fixed: Enforce 200 status header for valid ActivityPub requests.
141141
* Fixed: Integration of content-visibility setup in the block editor.
142+
* Fixed: Update CLI commands to the new scheduler refactorings.
142143

143144
= 5.1.0 =
144145

0 commit comments

Comments
 (0)