Repository navigation
Commit bb0e04b
committed
Document all accepted fields for the catch-all write commands
`user update`, `post create`, `post update`, `comment create` and
`comment update` accept `--<field>=<value>`, and their documented field lists
have drifted from what core actually accepts. `comment update` documented no
fields at all.
Fill the lists in from the wp_insert_user(), wp_insert_post() and
wp_update_comment() docblocks in core:
- user update: syntax_highlighting, comment_shortcuts, admin_color, use_ssl,
user_activation_key, spam, show_admin_bar_front, locale, meta_input
- post create: page_template, import_id
- post update: page_template
- comment create / comment update: the full column set, including the
mixed-case comment_author_IP and comment_post_ID
Two related changes:
- `user application-password update` advertised `--<field>=<value>` while
documenting that only `name` is supported. Core's
WP_Application_Passwords::update_application_password() only ever reads
`$update['name']`, so declare that parameter and drop the catch-all. The
command is then validated without depending on anything else.
- `--meta_input` and `--comment_meta` take arrays, so run them through
Utils\parse_shell_arrays() the way Post_Command::update() already does.
Without it a JSON value reaches core as a string.
The new parameters have no effect on validation on their own, since the
catch-all still suppresses it. They are what gives typo detection something
accurate to match against.
Refs wp-cli/wp-cli#5286
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014SSZzqMJRDTiLiDxQEPYcL1 parent c72df36 commit bb0e04b
4 files changed
Lines changed: 139 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
83 | 128 | | |
84 | 129 | | |
85 | 130 | | |
| |||
100 | 145 | | |
101 | 146 | | |
102 | 147 | | |
| 148 | + | |
| 149 | + | |
103 | 150 | | |
104 | 151 | | |
105 | 152 | | |
| |||
137 | 184 | | |
138 | 185 | | |
139 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
140 | 233 | | |
141 | 234 | | |
142 | 235 | | |
| |||
150 | 243 | | |
151 | 244 | | |
152 | 245 | | |
| 246 | + | |
| 247 | + | |
153 | 248 | | |
154 | 249 | | |
155 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
130 | 137 | | |
131 | 138 | | |
132 | 139 | | |
| |||
338 | 345 | | |
339 | 346 | | |
340 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
341 | 351 | | |
342 | 352 | | |
343 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
| 360 | + | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
541 | 555 | | |
542 | 556 | | |
543 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
544 | 568 | | |
545 | 569 | | |
546 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
547 | 577 | | |
548 | 578 | | |
549 | 579 | | |
| |||
584 | 614 | | |
585 | 615 | | |
586 | 616 | | |
| 617 | + | |
| 618 | + | |
587 | 619 | | |
588 | 620 | | |
589 | 621 | | |
| |||
0 commit comments