| @@ -6,21 +6,8 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace Activitypub; |
| 9 | 9 | |
| 10 | -use Activitypub\Cli\Actor_Command; | |
| 11 | -use Activitypub\Cli\Blurhash_Command; | |
| 12 | -use Activitypub\Cli\Cache_Command; | |
| 13 | -use Activitypub\Cli\Command; | |
| 14 | -use Activitypub\Cli\Comment_Command; | |
| 15 | -use Activitypub\Cli\Fetch_Command; | |
| 16 | -use Activitypub\Cli\Follow_Command; | |
| 17 | -use Activitypub\Cli\Move_Command; | |
| 18 | -use Activitypub\Cli\Outbox_Command; | |
| 19 | -use Activitypub\Cli\Post_Command; | |
| 20 | -use Activitypub\Cli\Self_Destruct_Command; | |
| 21 | -use Activitypub\Cli\Stats_Command; | |
| 22 | - | |
| 23 | 10 | /** |
| 24 | 11 | * ActivityPub CLI command registry. |
| 25 | 12 | * |
| 26 | 13 | * Registers all ActivityPub CLI subcommands with WP-CLI. |
| @@ -43,17 +30,15 @@ | ||
| 43 | 30 | * - wp activitypub cache <clear|status> [--type=<type>] |
| 44 | 31 | * - wp activitypub self-destruct [--status] [--yes] |
| 45 | 32 | * - wp activitypub move <from> <to> |
| 46 | 33 | * - wp activitypub follow <remote_user> |
| 47 | - * - wp activitypub stats <collect|compile|send> | |
| 48 | 34 | * - wp activitypub fetch <url> |
| 49 | - * - wp activitypub blurhash backfill [--dry-run] [--limit=<n>] [--force] | |
| 50 | 35 | */ |
| 51 | 36 | public static function register() { |
| 52 | 37 | // Register parent command with version subcommand. |
| 53 | 38 | \WP_CLI::add_command( |
| 54 | 39 | 'activitypub', |
| 55 | - Command::class, | |
| 40 | + '\Activitypub\Cli\Command', | |
| 56 | 41 | array( |
| 57 | 42 | 'shortdesc' => 'Manage ActivityPub plugin functionality and federation.', |
| 58 | 43 | ) |
| 59 | 44 | ); |
| @@ -59,9 +44,9 @@ | ||
| 59 | 44 | ); |
| 60 | 45 | |
| 61 | 46 | \WP_CLI::add_command( |
| 62 | 47 | 'activitypub post', |
| 63 | - Post_Command::class, | |
| 48 | + '\Activitypub\Cli\Post_Command', | |
| 64 | 49 | array( |
| 65 | 50 | 'shortdesc' => 'Manage ActivityPub posts (delete or update).', |
| 66 | 51 | ) |
| 67 | 52 | ); |
| @@ -67,9 +52,9 @@ | ||
| 67 | 52 | ); |
| 68 | 53 | |
| 69 | 54 | \WP_CLI::add_command( |
| 70 | 55 | 'activitypub comment', |
| 71 | - Comment_Command::class, | |
| 56 | + '\Activitypub\Cli\Comment_Command', | |
| 72 | 57 | array( |
| 73 | 58 | 'shortdesc' => 'Manage ActivityPub comments (delete or update).', |
| 74 | 59 | ) |
| 75 | 60 | ); |
| @@ -75,9 +60,9 @@ | ||
| 75 | 60 | ); |
| 76 | 61 | |
| 77 | 62 | \WP_CLI::add_command( |
| 78 | 63 | 'activitypub actor', |
| 79 | - Actor_Command::class, | |
| 64 | + '\Activitypub\Cli\Actor_Command', | |
| 80 | 65 | array( |
| 81 | 66 | 'shortdesc' => 'Manage ActivityPub actors (delete or update).', |
| 82 | 67 | ) |
| 83 | 68 | ); |
| @@ -83,9 +68,9 @@ | ||
| 83 | 68 | ); |
| 84 | 69 | |
| 85 | 70 | \WP_CLI::add_command( |
| 86 | 71 | 'activitypub outbox', |
| 87 | - Outbox_Command::class, | |
| 72 | + '\Activitypub\Cli\Outbox_Command', | |
| 88 | 73 | array( |
| 89 | 74 | 'shortdesc' => 'Manage ActivityPub outbox items (undo or reschedule).', |
| 90 | 75 | ) |
| 91 | 76 | ); |
| @@ -91,9 +76,9 @@ | ||
| 91 | 76 | ); |
| 92 | 77 | |
| 93 | 78 | \WP_CLI::add_command( |
| 94 | 79 | 'activitypub self-destruct', |
| 95 | - Self_Destruct_Command::class, | |
| 80 | + '\Activitypub\Cli\Self_Destruct_Command', | |
| 96 | 81 | array( |
| 97 | 82 | 'shortdesc' => 'Remove the entire blog from the Fediverse.', |
| 98 | 83 | ) |
| 99 | 84 | ); |
| @@ -99,9 +84,9 @@ | ||
| 99 | 84 | ); |
| 100 | 85 | |
| 101 | 86 | \WP_CLI::add_command( |
| 102 | 87 | 'activitypub move', |
| 103 | - Move_Command::class, | |
| 88 | + '\Activitypub\Cli\Move_Command', | |
| 104 | 89 | array( |
| 105 | 90 | 'shortdesc' => 'Move the blog to a new URL.', |
| 106 | 91 | ) |
| 107 | 92 | ); |
| @@ -107,9 +92,9 @@ | ||
| 107 | 92 | ); |
| 108 | 93 | |
| 109 | 94 | \WP_CLI::add_command( |
| 110 | 95 | 'activitypub follow', |
| 111 | - Follow_Command::class, | |
| 96 | + '\Activitypub\Cli\Follow_Command', | |
| 112 | 97 | array( |
| 113 | 98 | 'shortdesc' => 'Follow a remote ActivityPub user.', |
| 114 | 99 | ) |
| 115 | 100 | ); |
| @@ -115,9 +100,9 @@ | ||
| 115 | 100 | ); |
| 116 | 101 | |
| 117 | 102 | \WP_CLI::add_command( |
| 118 | 103 | 'activitypub cache', |
| 119 | - Cache_Command::class, | |
| 104 | + '\Activitypub\Cli\Cache_Command', | |
| 120 | 105 | array( |
| 121 | 106 | 'shortdesc' => 'Manage remote media cache (clear or show status).', |
| 122 | 107 | ) |
| 123 | 108 | ); |
| @@ -123,27 +108,11 @@ | ||
| 123 | 108 | ); |
| 124 | 109 | |
| 125 | 110 | \WP_CLI::add_command( |
| 126 | 111 | 'activitypub fetch', |
| 127 | - Fetch_Command::class, | |
| 112 | + '\Activitypub\Cli\Fetch_Command', | |
| 128 | 113 | array( |
| 129 | 114 | 'shortdesc' => 'Fetch a remote URL with a signed ActivityPub request.', |
| 130 | - ) | |
| 131 | - ); | |
| 132 | - | |
| 133 | - \WP_CLI::add_command( | |
| 134 | - 'activitypub stats', | |
| 135 | - Stats_Command::class, | |
| 136 | - array( | |
| 137 | - 'shortdesc' => 'Manage ActivityPub statistics (collect, compile or send).', | |
| 138 | - ) | |
| 139 | - ); | |
| 140 | - | |
| 141 | - \WP_CLI::add_command( | |
| 142 | - 'activitypub blurhash', | |
| 143 | - Blurhash_Command::class, | |
| 144 | - array( | |
| 145 | - 'shortdesc' => 'Backfill Blurhash placeholders for image attachments.', | |
| 146 | 115 | ) |
| 147 | 116 | ); |
| 148 | 117 | } |
| 149 | 118 | } |