Commit 3466dbd
committed
Register WP-CLI command on cli_init
Replace direct CLI setup call in the constructor with an action hook: the constructor now hooks a new cli_init() method to the 'cli_init' action instead of calling cli() directly. The private method was renamed from cli() to cli_init() and the explicit WP_CLI runtime check was removed (registration now occurs on cli_init, which only runs under WP-CLI). The WP_CLI::add_command() registration remains unchanged.1 parent b03006f commit 3466dbd
1 file changed
Lines changed: 2 additions & 6 deletions
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 47 | + | |
52 | 48 | | |
53 | 49 | | |
54 | 50 | | |
| |||
0 commit comments