wp-cli / entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.
MIT License
100 stars 90 forks source link

Support arrays/JSON in pluck and patch #460

Closed BlairCooper closed 8 months ago

BlairCooper commented 8 months ago

Add support to for serialized arrays and JSON to both pluck and patch. Add additional examples and a note about the stdin blocking issue with patch.

Fixes #459

BlairCooper commented 8 months ago

Concerning JSON, while WordPress doesn't support storing JSON natively having this functionality would be useful. WordPress does store the health-check-site-status-result (transient) option as a JSON serialized string.

I may revisit this pull request and break it into smaller pieces. Can you have a look at the feature tests that were added and let me know if they're valid scenario, or if there are others that should be added?