Allow adding additional query vars#25
Conversation
|
@weston Added the |
westonruter
left a comment
There was a problem hiding this comment.
I don't think this plugin needs to know about this specific query var. There should be a filter applied which allows additional query vars and maybe sanitizes them as well.
| 'order', | ||
| ); | ||
|
|
||
| $allowed_query_vars = apply_filters( 'customize_object_selector_query_posts_allowed_vars', $allowed_query_vars ); |
There was a problem hiding this comment.
Maybe we should throw an error in case this returns null since then all the vars would be allowed. Or maybe in case of null we should set it to array() which will throw an error with $extra_query_vars. Thoughts?
There was a problem hiding this comment.
@miina there's no need for this customize_object_selector_query_posts_allowed_vars filter now because the opt-in will instead be accounted for below in the customize_object_selector_post_query_vars filter.
There was a problem hiding this comment.
💡 Of course not, doh. Will remove.
No description provided.