/**
  * Inject the GeoLoc settings into the general TEC settings screen
  *
  * @param $args
  * @param $id
  *
  * @return array
  */
 public function inject_settings($args, $id)
 {
     if ($id == 'general') {
         $venues = $this->get_venues_without_geoloc_info();
         // we want to inject the map default distance and unit into the map section directly after "enable Google Maps"
         $args = TribeEventsPro::array_insert_after_key('embedGoogleMaps', $args, array('geoloc_default_geofence' => array('type' => 'text', 'label' => __('Map view search distance limit', 'tribe-events-calendar-pro'), 'size' => 'small', 'tooltip' => __('Set the distance that the location search covers (find events within X distance units of location search input).', 'tribe-events-calendar-pro'), 'default' => '25', 'class' => '', 'validation_type' => 'number_or_percent'), 'geoloc_default_unit' => array('type' => 'dropdown', 'label' => __('Map view distance unit', 'tribe-events-calendar-pro'), 'validation_type' => 'options', 'size' => 'small', 'default' => 'miles', 'options' => apply_filters('tribe_distance_units', array('miles' => __('Miles', 'tribe-events-calendar-pro'), 'kms' => __('Kilometers', 'tribe-events-calendar-pro')))), 'geoloc_fix_venues' => array('type' => 'html', 'html' => '<a name="geoloc_fix"></a><fieldset class="tribe-field tribe-field-html"><legend>' . __('Fix geolocation data', 'tribe-events-calendar-pro') . '</legend><div class="tribe-field-wrap">' . $this->fix_geoloc_data_button() . '<p class="tribe-field-indent description">' . sprintf(__("You have %d venues for which we don't have geolocation data. We need to use the Google Maps API to get that information. Doing this may take a while (aprox. 1 minute for every 200 venues).", 'tribe-events-calendar-pro'), $venues->found_posts) . '</p></div></fieldset>', 'conditional' => $venues->found_posts > 0)));
     } elseif ($id == 'display') {
         $args = TribeEventsPro::array_insert_after_key('tribeDisableTribeBar', $args, array('hideLocationSearch' => array('type' => 'checkbox_bool', 'label' => __('Hide location search', 'tribe-events-calendar-pro'), 'tooltip' => __('Removes location search field from the events bar on all views except for map view.', 'tribe-events-calendar-pro'), 'default' => false, 'validation_type' => 'boolean')));
     }
     return $args;
 }
 /**
  * Adds setting for hiding subsequent occurrences by default.
  *
  * @since 3.0
  * @author PaulHughes
  *
  * @return void
  */
 public function inject_settings($args, $id)
 {
     if ($id == 'general') {
         // we want to inject the hiding subsequent occurrences into the general section directly after "Live update AJAX"
         $args = TribeEventsPro::array_insert_after_key('liveFiltersUpdate', $args, array('hideSubsequentRecurrencesDefault' => array('type' => 'checkbox_bool', 'label' => __('Recurring event instances', 'tribe-events-calendar-pro'), 'tooltip' => __('Show only the first instance of each recurring event.', 'tribe-events-calendar-pro'), 'default' => false, 'validation_type' => 'boolean'), 'userToggleSubsequentRecurrences' => array('type' => 'checkbox_bool', 'label' => __('Front-end recurring event instances toggle', 'tribe-events-calendar-pro'), 'tooltip' => __('Allow users to decide whether to show all instances of a recurring event.', 'tribe-events-calendar-pro'), 'default' => false, 'validation_type' => 'boolean')));
     }
     return $args;
 }