/** * Enqueue the proper styles depending on what is requred by a given page load. * * @return void * @author Jessica Yazbek * @since 3.0 */ public function enqueue_styles() { if (tribe_is_event_query() || is_active_widget(false, false, 'tribe-events-adv-list-widget') || is_active_widget(false, false, 'tribe-mini-calendar') || is_active_widget(false, false, 'tribe-events-countdown-widget') || is_active_widget(false, false, 'next_event') || is_active_widget(false, false, 'tribe-events-venue-widget')) { Tribe_PRO_Template_Factory::asset_package('events-pro-css'); } }
/** * Enqueue the maps JS in all the views (Needed for the location filter in the Tribe Bar) */ public function scripts() { if (tribe_is_event_query() && !is_single()) { Tribe_PRO_Template_Factory::asset_package('ajax-maps'); } }