Home › Forums › Calendar Products › Events Calendar PRO › Longevity of tribe_events_parse_query action hook
- This topic has 4 replies, 2 voices, and was last updated 10 years, 1 month ago by
Geoff B..
-
AuthorPosts
-
March 31, 2016 at 6:20 am #1096346
Robert
ParticipantHello,
We are using Events Calendar PRO for our new website design, and have some complex custom filtration needs. Unfortunately, the Events Calendar Filterbar (which we purchased) does not quite cover it.
We are using the tribe_events_parse_query action hook to inject custom query parameters to the query object. It is working very well for our needs, and can all be contained within template logic, which is a bonus for our application.
However, I often see functions and features get marked deprecated and then removed from subsequent releases. I would like to ask about the potential longevity of tribe_events_parse_query — is it going to be around for awhile? Is hooking into the query at this level a future-proof an resilient strategy?
Or is there something else better that you can recommend?
Thanks in advance for any help you can provide. We would like to be happy ECP customers for a long time to come. 🙂
Best wishes,
RobertMarch 31, 2016 at 6:25 am #1096347Robert
Participantp.s. for example, I see that Events Calendar Filterbar hooks into various add_action hooks like:
tribe_events_filter_view_do_display_filters
tribe_events_pre_get_posts
parse_queryas well as interacting more directly with the query via filters like:
posts_join
posts_whereand I wonder if this type of approach would be more resilient since I am guessing you will preserve compatibility with your own suite of plugins on future updates of the core plugin.
Looking forward to your thoughts!
April 1, 2016 at 10:11 am #1097116Geoff B.
MemberGood afternoon Robert and welcome back!
Thank you for reaching out to us. It’s really appreciated.
I went ahead and relayed your points to our Dev team.
As you might know, it’s near impossible to commit to never changing the hooks (as the plugin evolves).
But, that being said, that hook is a solid choice and one we ourselves use when writing and proposing solutions to problems.
If for any reason we were to remove such a pivotal hook we’d certainly blare the trumpets and trigger deprecation warnings etc before doing so but there’s no immediate risk of that.
On a related note, you might be interested in our Advanced Post Manager plugin (documentation found in the plugin’s folder) that adds a few extra filters:Â https://en-ca.wordpress.org/plugins/advanced-post-manager/
Have a good week-end,
Geoff B.
April 5, 2016 at 4:37 am #1098244Robert
ParticipantHi Geoff,
Many thanks for that. We’ll leave our solution as it is currently based on the tribe_events_parse_query hook, and be sure to look out for deprecation notices as we go along.
Thanks again!
Best,
RobertApril 5, 2016 at 4:47 pm #1098705Geoff B.
MemberHey Robert,
My pleasure.
You are welcome back on our support forums any time 🙂
For now, I am going to close this thread.
Have a great week!
Geoff B.
-
AuthorPosts
- The topic ‘Longevity of tribe_events_parse_query action hook’ is closed to new replies.
