Open
Conversation
Added support for dynamic date functions in meta queries.
Added information about using MySQL date functions in meta queries.
Added support for dynamic date functions using MySQL.
Owner
|
Overall, I love this idea! I have a couple of thoughts that I'd love to get your input on:
Great work and thanks for the PR! |
Author
|
Yeah I wondered about the params generator but felt that had the UI and options already there for dynamic dates. I’ll look again to see what consolidation we can do. I’d gone for developer focused terms I think because the advanced meta queries felt like you need to know about data types and things already, but you’re right, they can be any strings so user friendly terms is a great shout. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some cases with a meta query you might want to build out a date query and use dynamic ranges, or make comparisons to date information for other purposes without necessarily casting values to date/time types. This is a little step in that direction that we've used in projects via a
pre_get_postsfilter, would be great to get your thoughts on the approach.