X
355714

Add a hook to filter taxonomy terms

We needed to create a filter that shows a hierarchical list of countries and cities and unfortunately the current filters doesn't display the taxonomy terms in such an order to show children under parents but rather displays a plain list of terms. To solve our issue we've had to modify the following core file ( wp-content/plugins/eventON/includes/calendar/class-calendar-filtering.php:192 ) and implement a new hook:

evo_get_frontend_filter_tax_{{taxonomy}}_terms

Here is the modified code that I'm using right now in production:

$cats = apply_filters( 'evo_get_frontend_filter_tax_'.$vv.'_terms', get_terms( apply_filters('evo_get_frontend_filter_tax',
array( 'taxonomy'=> $vv,'hide_empty'=> false, )
)));

Would be good if you can add this as soon as possible so I can keep my plugins updated without core files modifications.

Thank you!

BY: Andrei Gazez - Jun 3,2024 AT 4:17AM - 2 years ago
You must login to reply to this ticket

HelpDesk

Welcome to EventON helpdesk.

EventON is the #1 Best selling event calendar plugin for WordPress websites in envato marketplace.

Checkout EventON