PluginProbe
ActivityPub / 8.0.0
ActivityPub v8.0.0
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
activitypub / includes / class-cli.php

class-cli.php in ActivityPub 8.0.0, at includes/class-cli.php

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