Commit e3ddfbe
committed
Refactor WP-CLI structure with separate command class
- Split CLI functionality into Tiny_Cli (registration) and Tiny_Cli_Commands (commands)
- Make register() static to properly handle WP-CLI command registration
- Separate command logic from registration logic for better architecture
- Add optimize command with proper WP-CLI documentation format
- Use private methods for helpers to prevent unwanted CLI command exposure
This prevents WP-CLI from exposing internal methods as commands while
providing a clean interface for the actual CLI functionality.1 parent 3fc3660 commit e3ddfbe
1 file changed
Lines changed: 38 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
29 | | - | |
30 | | - | |
| 40 | + | |
| 41 | + | |
31 | 42 | | |
32 | | - | |
| 43 | + | |
33 | 44 | | |
34 | 45 | | |
35 | 46 | | |
36 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
37 | 66 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 67 | + | |
| 68 | + | |
43 | 69 | | |
44 | 70 | | |
45 | | - | |
46 | | - | |
| 71 | + | |
| 72 | + | |
47 | 73 | | |
48 | | - | |
| 74 | + | |
0 commit comments