/** * Enqueue the proper PRO scripts as necessary. * * @return void */ public function enqueue_pro_scripts() { if (tribe_is_event_query()) { // @TODO filter the tribe_events_resource_url() function $path = Tribe__Events__Pro__Template_Factory::getMinFile(tribe_events_pro_resource_url('tribe-events-pro.js'), true); wp_enqueue_script('tribe-events-pro', $path, array('jquery', 'tribe-events-calendar-script'), apply_filters('tribe_events_pro_js_version', self::VERSION), false); $geoloc = Tribe__Events__Pro__Geo_Loc::instance(); $data = array('geocenter' => $geoloc->estimate_center_point(), 'map_tooltip_event' => __('Event: ', 'tribe-events-calendar-pro'), 'map_tooltip_address' => __('Address: ', 'tribe-events-calendar-pro')); $data = apply_filters('tribe_events_pro_localize_script', $data, 'Tribe__Events__Pro__Main', 'tribe-events-pro'); wp_localize_script('tribe-events-pro', 'TribeEventsPro', $data); } }