-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathclass-cli.php
More file actions
109 lines (98 loc) · 2.44 KB
/
class-cli.php
File metadata and controls
109 lines (98 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
/**
* WP-CLI commands registration.
*
* @package Activitypub
*/
namespace Activitypub;
/**
* ActivityPub CLI command registry.
*
* Registers all ActivityPub CLI subcommands with WP-CLI.
*
* @package Activitypub
*/
class Cli {
/**
* Register all ActivityPub CLI commands.
*
* This method registers the main 'activitypub' command namespace and all its
* subcommands for managing ActivityPub functionality via WP-CLI.
*
* Available commands:
* - wp activitypub post <delete|update> <id>
* - wp activitypub comment <delete|update> <id>
* - wp activitypub actor <delete|update> <id>
* - wp activitypub outbox <undo|reschedule> <id>
* - wp activitypub self-destruct [--status] [--yes]
* - wp activitypub move <from> <to>
* - wp activitypub follow <remote_user>
* - wp activitypub fetch <url>
*/
public static function register() {
// Register parent command with version subcommand.
\WP_CLI::add_command(
'activitypub',
'\Activitypub\Cli\Command',
array(
'shortdesc' => 'Manage ActivityPub plugin functionality and federation.',
)
);
\WP_CLI::add_command(
'activitypub post',
'\Activitypub\Cli\Post_Command',
array(
'shortdesc' => 'Manage ActivityPub posts (delete or update).',
)
);
\WP_CLI::add_command(
'activitypub comment',
'\Activitypub\Cli\Comment_Command',
array(
'shortdesc' => 'Manage ActivityPub comments (delete or update).',
)
);
\WP_CLI::add_command(
'activitypub actor',
'\Activitypub\Cli\Actor_Command',
array(
'shortdesc' => 'Manage ActivityPub actors (delete or update).',
)
);
\WP_CLI::add_command(
'activitypub outbox',
'\Activitypub\Cli\Outbox_Command',
array(
'shortdesc' => 'Manage ActivityPub outbox items (undo or reschedule).',
)
);
\WP_CLI::add_command(
'activitypub self-destruct',
'\Activitypub\Cli\Self_Destruct_Command',
array(
'shortdesc' => 'Remove the entire blog from the Fediverse.',
)
);
\WP_CLI::add_command(
'activitypub move',
'\Activitypub\Cli\Move_Command',
array(
'shortdesc' => 'Move the blog to a new URL.',
)
);
\WP_CLI::add_command(
'activitypub follow',
'\Activitypub\Cli\Follow_Command',
array(
'shortdesc' => 'Follow a remote ActivityPub user.',
)
);
\WP_CLI::add_command(
'activitypub fetch',
'\Activitypub\Cli\Fetch_Command',
array(
'shortdesc' => 'Fetch a remote URL with a signed ActivityPub request.',
)
);
}
}