Title: Normalise `--rich_editing` and `--syntax_highlighting` on `user update` as `user create` does · Issue #656 · wp-cli/entity-command · GitHub
Open Graph Title: Normalise `--rich_editing` and `--syntax_highlighting` on `user update` as `user create` does · Issue #656 · wp-cli/entity-command
X Title: Normalise `--rich_editing` and `--syntax_highlighting` on `user update` as `user create` does · Issue #656 · wp-cli/entity-command
Description: Follow-up to #637 (merged as 9408392). That PR made user create --rich_editing store what core compares against: src/User_Command.php:445-446 runs the value through FILTER_VALIDATE_BOOLEAN and writes 'true' or 'false'. user update still ...
Open Graph Description: Follow-up to #637 (merged as 9408392). That PR made user create --rich_editing store what core compares against: src/User_Command.php:445-446 runs the value through FILTER_VALIDATE_BOOLEAN and writ...
X Description: Follow-up to #637 (merged as 9408392). That PR made user create --rich_editing store what core compares against: src/User_Command.php:445-446 runs the value through FILTER_VALIDATE_BOOLEAN and writ...
Opengraph URL: https://github.com/wp-cli/entity-command/issues/656
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Normalise `--rich_editing` and `--syntax_highlighting` on `user update` as `user create` does","articleBody":"Follow-up to #637 (merged as 9408392). That PR made `user create --rich_editing` store what core compares against: `src/User_Command.php:445-446` runs the value through `FILTER_VALIDATE_BOOLEAN` and writes `'true'` or `'false'`. `user update` still hands the raw string to `wp_update_user()` (`src/User_Command.php:601-629`, `parent::_update()` at `:629`), and core stores it as given (`wp-includes/user.php:2514`, `:2516`).\n\nCore reads the two options as string literals:\n\n- `user_can_richedit()` enables the editor only when the stored value is exactly `'true'` (`wp-includes/general-template.php:4200`). So `wp user update 5 --rich_editing=1` disables the visual editor for that user.\n- The code editor is switched off only when the stored value is exactly `'false'` (`general-template.php:4317`). So `wp user update 5 --syntax_highlighting=0` leaves syntax highlighting on.\n\nBoth flags report `Success:` either way. The docblocks at `src/User_Command.php:546-552` say \"'true' or 'false' as a string literal, not boolean\", which is accurate, but a flag that accepts `1` and `0` on `create` and silently inverts or ignores them on `update` is a trap.\n\nDone looks like: `update()` normalises `rich_editing` and `syntax_highlighting` the way `create()` does before calling `parent::_update()`, the two docblocks say the same as the `create` one (`'true'`/`'false'` or `1`/`0`), and `features/user.feature` has a scenario for each flag on `user update` with a numeric value. Same handling for `syntax_highlighting` on `create` while at it, since `create` does not touch it today.","author":{"url":"https://github.com/schlessera","@type":"Person","name":"schlessera"},"datePublished":"2026-09-14T19:06:36Z","url":"https://github.com/wp-cli/entity-command/issues/656"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e6cd64ec-3332-931a-589d-a3053359cea1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F1C:196034:3B5454D:4EC63AA:6AFA3434 |
| html-safe-nonce | cba3719710bf08ceb6c1a8105aa0723916f62e6a8ff4e7e65a24fb5fec3657af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjFDOjE5NjAzNDozQjU0NTREOjRFQzYzQUE6NkFGQTM0MzQiLCJ2aXNpdG9yX2lkIjoiNzQ2OTYxMjA0OTg3ODM2NTIzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | db8c87b8339728741e5b84fae94f4269fde00cf717e5fcdb5db481db50c3bd9e |
| hovercard-subject-tag | issue:5453438264 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/wp-cli/entity-command/656/issue_layout |
| twitter:image | https://opengraph.githubassets.com/651d6bc61ec4d0f6345a98aa93c3fd1a96a4c6ca8ceeaa3e4fc3c18d8a6a99f2/wp-cli/entity-command/issues/656 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/651d6bc61ec4d0f6345a98aa93c3fd1a96a4c6ca8ceeaa3e4fc3c18d8a6a99f2/wp-cli/entity-command/issues/656 |
| og:image:alt | Follow-up to #637 (merged as 9408392). That PR made user create --rich_editing store what core compares against: src/User_Command.php:445-446 runs the value through FILTER_VALIDATE_BOOLEAN and writ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | schlessera |
| hostname | github.com |
| expected-hostname | github.com |
| None | 612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7 |
| turbo-cache-control | no-preview |
| go-import | github.com/wp-cli/entity-command git https://github.com/wp-cli/entity-command.git |
| octolytics-dimension-user_id | 1570774 |
| octolytics-dimension-user_login | wp-cli |
| octolytics-dimension-repository_id | 87201389 |
| octolytics-dimension-repository_nwo | wp-cli/entity-command |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 87201389 |
| octolytics-dimension-repository_network_root_nwo | wp-cli/entity-command |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 072e34035c13c31543fba9f025cbbbda4210dae4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width