You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
support WP_Query's date_query values from wp post list command-line #519
Describe your use case and the problem you are facing
wp post list support arbitrary --<field> being passed to WP_Query but date parameters which depends on a nested structure are not handled. Doing so would allow handy filtering logic based on post date attributes.
Describe the solution you'd like
--date-<field> could be used as a prefix opening the way to things like --date-before=2024-01-01 or --date-year=2025
(The same applied to meta_query would also be great as it would resolves the long-standing problem of retrieving posts based on meta-condition straight from wp post list without any piping/subcommand)
Activity
swissspidy commentedon Feb 2, 2025
Thanks for the suggestion!
Perhaps we could support JSON input for these cases.
swissspidy commentedon Feb 7, 2025
Previously:
\WP_CLI\Utils\parse_shell_arraysis the easy solution here.drzraf commentedon Feb 20, 2025
Could you please add
tax_queryto this$array_argumentsvariable. I tested, it works well!swissspidy commentedon Feb 20, 2025
Are you perhaps up for submitting a PR? :-)
drzraf commentedon Feb 20, 2025
Yes... but... I fear... you may legitimately ask for behat tests and their
swissspidy commentedon Feb 21, 2025
See, it basically writes itself :-)
But here you go: #522