-
Notifications
You must be signed in to change notification settings - Fork 37
Improve meta query support #191
Improve meta query support #191
Conversation
I will update test cases. |
The last Where it was including value of SQL data which was already changed in preview. So, I use |
* @type bool $publish IN query or NOT IN query. | ||
* } | ||
*/ | ||
$post_ids = apply_filters( 'customize_previewed_posts', $post_ids, array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be customize_previewed_posts_for_query
or something a bit more specific than customize_previewed_posts
if we add a filter here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatelUtkarsh And to be clear, the reason why we need a filter is because get_previewed_posts_for_query
doesn't support all query vars, correct? If Customize Posts properly understood all query vars, then there shouldn't be a need for a new filter, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct.
I will change filter name to customize_previewed_posts_for_query
…nto feature/meta-queries-update
…omize-posts into feature/meta-queries-update
Add
IN
Meta query compare support.Using
$publish
flag to filter out posts which do not match meta query.Add filter
customize_previewed_posts_for_query
for filtering previewed posts.