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