api->getProviderLocations(); if ($locationsResponse->statusCode == 200) { foreach ($locationsResponse->data as $key => $locationdata) { $locations[$locationdata->_id] = $locationdata->name; } } $options = ""; foreach ($locations as $location_id => $location) { $options .= wp_sprintf('', $location_id, $location); } if ($fielddaySetting['fieldday_filters_mode'] == 'slide') { $slideClass = "km_listtheme_filter_content"; } return '
'; } add_filter('fieldday_session_filter_search', 'theme_view_session_filter_search', 11, 2); function theme_view_session_filter_search() {global $fielddaySetting; if ($fielddaySetting['fieldday_filters_mode'] == 'slide') { $slideClass = "km_listtheme_filter_content"; } return '
'; } add_filter('fieldday_session_filter_types', 'theme_view_session_filter_types', 11, 3); function theme_view_session_filter_types($content, $filterKey, $activityTags) { $html = '
'; $html .= ''; $html .= '
'; if ($activityTags) { $html .= ''; foreach ($activityTags as $key => $type) { $checked = ($type->_id == $data['tagId']) ? 'checked' : ''; //print_r($type); if ($type->title == 'Event Ticket') {$tab = 'events';} else { $tab = $type->title;} $tagTitle = $type->wpShowTitle ? $type->wpShowTitle : $type->title; $html .= ''; } } $isavailable = fieldday()->engine->GetBankDays(); if ($isavailable == true) { //$checked = ($type->_id == $data['tagId']) ? 'checked' : ''; $html .= ''; } else { //echo "isfalse"; } $isgift = fieldday()->engine->GetGiftCards(); if ($isgift == true) { //$checked = ($type->_id == $data['tagId']) ? 'checked' : ''; $html .= ''; } else { //echo "isfalse"; } $html .= '
'; $html .= '
Using the tabs above, select the activity of interest
'; $html .= '
'; return $html; } add_filter('fieldday_session_filter_month', 'theme_view_session_filter_month', 11, 2); function theme_view_session_filter_month() { $html = '
 
'; return $html; } //add_filter('fieldday_session_filter_bankdays', 'theme_view_session_filter_bankdays', 11, 2); function theme_view_session_filter_bankdays($content, $filterKey) { return '
'; } add_filter('fieldday_session_filter_age', 'theme_view_session_filter_age', 11, 2); function theme_view_session_filter_age($content, $filterKey) { $html = '
'; $html .= ''; $html .= '
'; for ($age = 1; $age <= 20; $age++) { $html .= ''; } $html .= '
'; $html .= '
'; return $html; } add_filter('fieldday_session_filter_activities', 'theme_view_session_filter_activities', 11, 3); function theme_view_session_filter_activities($content, $filterKey, $activityTags) { $activities = []; $getActivities = fieldday()->api->getFeaturedActivities(); if ($getActivities->statusCode == 200) { foreach ($getActivities->data as $key => $activity) { $activities[$activity->_id] = $activity->title; } } $options = ""; foreach ($activities as $key => $activity_name) { $options .= wp_sprintf('', $key, $activity_name); } $html = '
'; $html .= ''; $html .= '
'; if ($activities) { $html .= ''; foreach ($activities as $key => $activity_name) { if (isset($_REQUEST['activityId'])) { $checked = ($key == $_REQUEST['activityId']) ? 'checked' : ''; } else { $checked = ($key == $data['actvityfilterId']) ? 'checked' : ''; } $html .= ''; } } $html .= '
'; $html .= '
'; return $html; }