| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
'filter' is a property of WP_Post and WP_User rather than a column of either table. It holds the sanitization level the object was loaded with, which is 'raw' for every row 'wp post list' returns and empty for every row 'wp user list' returns. Neither tells a reader anything about the post or the user. 'wp post get' has never shown it, so listing it as available only for the list commands was inconsistent as well as useless. This drops it from the documented fields and leaves the commands alone. The property is still on the objects, so asking for it by name still produces what it always did, but nothing advertises it any more. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SSZzqMJRDTiLiDxQEPYcL
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 25f39510-5022-48b9-883d-6f03c3c50ae5 📥 CommitsReviewing files that changed from the base of the PR and between fcf429a and f4f5662. 📒 Files selected for processing (3)
Included review availability: Your plan includes up to 2 reviews per rolling hour; 1 remains after this review. 📝 Walkthrough WalkthroughThe change removes filter from the documented optional fields for wp post list and wp user list in the README and user command documentation. ChangesList field documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to f4f56 This localized documentation-only change removes misleading filter field entries without changing command behavior, so no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
filter is a property of WP_Post and WP_User, not a column of either table. Core's own docblock says so: "Stores the post object's sanitization level. Does not correspond to a DB field." It holds raw, edit, display and so on — how the object was sanitized, nothing about the post or the user.
In practice it is a constant:
wp post get has never displayed it, so advertising it only for the list commands was inconsistent as well as useless.
This drops it from the documented fields on wp post list and wp user list and leaves the commands themselves alone. The property is still on the objects, so asking for it by name still yields what it always did — nothing advertises it any more.
The field list was never exhaustive
Worth knowing when reading this diff: "documented" and "works" have never been the same set for these commands. WP_Post resolves anything it does not declare through __isset()/__get(), so all of the following work as fields on wp post list today, and none of them are listed under AVAILABLE FIELDS:
So AVAILABLE FIELDS is the useful subset rather than a whitelist, and removing an entry from it says "this is not worth reaching for" rather than "this no longer resolves". filter simply joins the group above.
Why documentation only
I first tried actually suppressing it, and that turned out to be the wrong trade. Removing it from a WP_Post means either unsetting the property or building an array of the object's properties, and both cost more than they are worth:
wp post get lacks those magic fields precisely because it does build an array, so making list match get would mean list losing something real. Not worth it to hide a field that no longer appears in the docs.
Refs wp-cli/wp-cli#5286
Summary by CodeRabbit