/** GENERATE individual event data	 */
    public function generate_event_data($event_list_array, $focus_month_beg_range = '', $FOCUS_month_int = '', $FOCUS_year_int = '')
    {
        $months_event_array = '';
        // Initial variables
        $wp_time_format = get_option('time_format');
        $default_event_color = !empty($this->evopt1['evcal_hexcode']) ? '#' . $this->evopt1['evcal_hexcode'] : '#206177';
        $__shortC_arg = $this->shortcode_args;
        // user interavtion for the calendar
        $calendar_ux_val = !empty($__shortC_arg['ux_val']) ? $__shortC_arg['ux_val'] : '0';
        $__count = 0;
        // EVENT CARD open by default variables
        $_is_eventCardOpen = !empty($__shortC_arg['evc_open']) && $__shortC_arg['evc_open'] == 'yes' ? true : ($this->is_eventcard_open ? true : false);
        $eventcard_script_class = $_is_eventCardOpen ? "gmaponload" : null;
        $this->is_eventcard_open = false;
        // check featured events are prioritized
        $__feature_events = !empty($__shortC_arg['ft_event_priority']) && $__shortC_arg['ft_event_priority'] != 'no' ? true : false;
        // GET EventTop fields - v2.1.17
        $eventop_fields = !empty($this->evopt1['evcal_top_fields']) ? $this->evopt1['evcal_top_fields'] : null;
        // Number of activated taxnomonies v 2.2.15
        $_active_tax = evo_get_ett_count($this->evopt1);
        // eventCARD HTML
        require_once AJDE_EVCAL_PATH . '/includes/eventon_eventCard.php';
        require_once AJDE_EVCAL_PATH . '/includes/eventon-eventTop.php';
        // check if single event exist
        $_sin_ev_ex = in_array('eventon-single-event/eventon-single-event.php', get_option('active_plugins')) ? true : false;
        // EACH EVENT
        if (is_array($event_list_array)) {
            foreach ($event_list_array as $event_) {
                // Intials
                $html_event_detail_card = '';
                $_eventClasses = $_eventInClasses = array();
                $_eventAttr = $_eventInAttr = array();
                $__count++;
                $event_id = $event_['event_id'];
                $event_start_unix = $event_['event_start_unix'];
                $event_end_unix = $event_['event_end_unix'];
                $event_type = $event_['event_type'];
                $ev_vals = $event_['event_pmv'];
                $event = get_post($event_id);
                $_eventInClasses[] = $eventcard_script_class;
                // set how a single event would interact
                $event_ux_val = !empty($ev_vals['_evcal_exlink_option']) ? $ev_vals['_evcal_exlink_option'][0] : 1;
                $event_permalink = get_permalink($event_id);
                $event_ux_val = $calendar_ux_val != '1' ? $calendar_ux_val : $event_ux_val;
                // whether eventcard elements need to be included or not
                $card_for_cal = $calendar_ux_val == '4' || $calendar_ux_val == 'X' ? false : true;
                // whether calendar call for card
                $_event_card_on = $card_for_cal || $event_ux_val != '4' && $event_ux_val != '2' ? true : false;
                $_event_card_on = $_is_eventCardOpen ? true : $_event_card_on;
                // if event card is forced to open then
                $html_tag = $event_ux_val == '1' ? 'div' : 'a';
                $html_tag = $_event_card_on ? 'a' : $html_tag;
                //echo ($_is_eventCardOpen?3:4). ' '.($_event_card_on?3:4). ' '.$calendar_ux_val.' '.$event_ux_val;
                // year long or not
                $__year_long_event = !empty($ev_vals['evo_year_long']) && $ev_vals['evo_year_long'][0] == 'yes' ? true : 0;
                // define variables
                $ev_other_data = $ev_other_data_top = $html_event_type_info = $_event_date_HTML = $_eventcard = $html_event_type_2_info = '';
                $_is_end_date = true;
                // UNIX date values
                $DATE_start_val = eventon_get_formatted_time($event_start_unix);
                if (empty($event_end_unix)) {
                    $_is_end_date = false;
                    $DATE_end_val = $DATE_start_val;
                } else {
                    $DATE_end_val = eventon_get_formatted_time($event_end_unix);
                }
                // if this event featured
                $_eventInClasses['__featured'] = $this->helper->evo_meta('_featured', $ev_vals, 'tf');
                $_eventInClasses['_cancel'] = $this->helper->evo_meta('_cancel', $ev_vals, 'tf');
                // GET: repeat interval for this event
                $__repeatInterval = !empty($event_['event_repeat_interval']) ? $event_['event_repeat_interval'] : (!empty($_GET['ri']) ? $_GET['ri'] : 0);
                // Unique ID generation
                $unique_varied_id = 'evc' . $event_start_unix . uniqid() . $event_id;
                $unique_id = 'evc_' . $event_start_unix . $event_id;
                // All day event variables
                $_is_allday = $this->helper->evo_meta('evcal_allday', $ev_vals, 'tf');
                $_hide_endtime = $this->helper->evo_meta('evo_hide_endtime', $ev_vals, 'tf');
                $evcal_lang_allday = $this->lang('evcal_lang_allday', 'All Day');
                /*
                	evo_hide_endtime
                	NOTE: if its set to hide end time, meaning end time and date would be empty on wp-admin, which will fall into same start end month category.
                */
                $_event_date_HTML = $this->generate_time_($DATE_start_val, $DATE_end_val, $ev_vals, $evcal_lang_allday, $focus_month_beg_range, $FOCUS_month_int, $event_start_unix, $event_end_unix);
                // (---) hook for addons
                $_event_date_HTML = apply_filters('eventon_eventcard_date_html', $_event_date_HTML, $event_id);
                // EACH DATA FIELD
                // EVENT FEATURES IMAGE
                $img_id = get_post_thumbnail_id($event_id);
                $img_med_src = $img_thumb_src = '';
                if ($img_id != '') {
                    $img_src = wp_get_attachment_image_src($img_id, 'full');
                    $img_med_src = wp_get_attachment_image_src($img_id, 'medium');
                    $img_thumb_src = wp_get_attachment_image_src($img_id, 'thumbnail');
                    // append to eventcard array
                    $_eventcard['ftimage'] = array('img' => $img_src, 'hovereffect' => !empty($this->evopt1['evo_ftimghover']) ? $this->evopt1['evo_ftimghover'] : null, 'clickeffect' => !empty($this->evopt1['evo_ftimgclick']) ? $this->evopt1['evo_ftimgclick'] : null, 'min_height' => !empty($this->evopt1['evo_ftimgheight']) ? $this->evopt1['evo_ftimgheight'] : 400, 'ftimg_sty' => !empty($this->evopt1['evo_ftimg_height_sty']) ? $this->evopt1['evo_ftimg_height_sty'] : 'minimized');
                }
                // EVENT DESCRIPTION
                $evcal_event_content = $event->post_content;
                if (!empty($evcal_event_content)) {
                    $event_full_description = $evcal_event_content;
                } else {
                    // event description compatibility from older versions.
                    $event_full_description = !empty($ev_vals['evcal_description']) ? $ev_vals['evcal_description'][0] : null;
                }
                if (!empty($event_full_description)) {
                    $except = $event->post_excerpt;
                    $event_excerpt = eventon_get_event_excerpt($event_full_description, 30, $except);
                    $_eventcard['eventdetails'] = array('fulltext' => $event_full_description, 'excerpt' => $event_excerpt);
                }
                // EVENT LOCATION
                $lonlat = !empty($ev_vals['evcal_lat']) && !empty($ev_vals['evcal_lon']) ? 'data-latlng="' . $ev_vals['evcal_lat'][0] . ',' . $ev_vals['evcal_lon'][0] . '" ' : null;
                $__location = $this->helper->evo_meta('evcal_location', $ev_vals, 'null');
                // location name
                $__location_name = stripslashes(evo_meta($ev_vals, 'evcal_location_name'));
                $_eventcard['timelocation'] = array('timetext' => $_event_date_HTML['html_prettytime'], 'location' => $__location, 'location_name' => $__location_name, 'timezone' => !empty($ev_vals['evo_event_timezone']) ? $ev_vals['evo_event_timezone'][0] : null);
                // Location Image
                $loc_img_id = $this->helper->evo_meta('evo_loc_img', $ev_vals, 'null');
                if (!empty($loc_img_id)) {
                    $_eventcard['locImg'] = array('id' => $loc_img_id, 'fullheight' => !empty($this->evopt1['evo_locimgheight']) ? $this->evopt1['evo_locimgheight'] : 400);
                    // location name and address
                    if (evo_check_yn($ev_vals, 'evcal_name_over_img') && !empty($__location_name)) {
                        $_eventcard['locImg']['locName'] = $__location_name;
                        if (!empty($__location)) {
                            $_eventcard['locImg']['locAdd'] = $__location;
                        }
                    }
                }
                // GOOGLE maps
                if ($this->google_maps_load && ($__location || !empty($lonlat)) && (!empty($ev_vals['evcal_gmap_gen']) && $ev_vals['evcal_gmap_gen'][0] == 'yes')) {
                    $_eventcard['gmap'] = array('id' => $unique_varied_id);
                    // GET directions
                    if ($this->evopt1['evo_getdir'] == 'yes' && !empty($ev_vals['evcal_location'])) {
                        $_eventcard['getdirection'] = array('fromaddress' => $ev_vals['evcal_location'][0]);
                    }
                } else {
                    $_eventInAttr['data-gmap_status'] = 'null';
                }
                // EVENT BRITE
                // check if eventbrite actually used in this event
                if ($_event_card_on && !empty($ev_vals['evcal_eventb_data_set']) && $ev_vals['evcal_eventb_data_set'][0] == 'yes') {
                    // Event brite capacity
                    if (!empty($ev_vals['evcal_eventb_tprice']) && !empty($ev_vals['evcal_eventb_url'])) {
                        $_eventcard['eventbrite'] = array('capacity' => !empty($ev_vals['evcal_eventb_capacity']) ? $ev_vals['evcal_eventb_capacity'][0] : null, 'tix_price' => $ev_vals['evcal_eventb_tprice'][0], 'url' => $ev_vals['evcal_eventb_url'][0]);
                    }
                }
                // PAYPAL Code
                if (!empty($ev_vals['evcal_paypal_item_price'][0]) && $this->evopt1['evcal_paypal_pay'] == 'yes' && !empty($this->evopt1['evcal_pp_email'])) {
                    $_eventcard['paypal'] = array('title' => $event->post_title . ' (' . date('Y-m-d h:ia', $event_start_unix) . ')', 'price' => $ev_vals['evcal_paypal_item_price'][0], 'text' => !empty($ev_vals['evcal_paypal_text']) ? $ev_vals['evcal_paypal_text'][0] : null, 'email' => !empty($ev_vals['evcal_paypal_email']) ? $ev_vals['evcal_paypal_email'][0] : $this->evopt1['evcal_pp_email']);
                }
                // Event Organizer
                if (!empty($ev_vals['evcal_organizer']) && (!empty($ev_vals['evo_evcrd_field_org']) && $ev_vals['evo_evcrd_field_org'][0] != 'yes')) {
                    $_eventcard['organizer'] = array('value' => $ev_vals['evcal_organizer'][0], 'contact' => !empty($ev_vals['evcal_org_contact']) ? $ev_vals['evcal_org_contact'][0] : null, 'exlink' => !empty($ev_vals['evcal_org_exlink']) ? $ev_vals['evcal_org_exlink'][0] : false, 'imgid' => !empty($ev_vals['evo_org_img']) ? $ev_vals['evo_org_img'][0] : null);
                }
                // Custom fields
                $_cmf_count = evo_retrieve_cmd_count($this->evopt1);
                for ($x = 1; $x < $_cmf_count + 1; $x++) {
                    if (!empty($this->evopt1['evcal_ec_f' . $x . 'a1']) && !empty($this->evopt1['evcal__fai_00c' . $x]) && !empty($ev_vals["_evcal_ec_f" . $x . "a1_cus"])) {
                        // check if hide this from eventCard set to yes
                        if (empty($this->evopt1['evcal_ec_f' . $x . 'a3']) || $this->evopt1['evcal_ec_f' . $x . 'a3'] == 'no') {
                            $faicon = $this->evopt1['evcal__fai_00c' . $x];
                            $_eventcard['customfield' . $x] = array('imgurl' => $faicon, 'x' => $x, 'value' => $ev_vals["_evcal_ec_f" . $x . "a1_cus"][0], 'valueL' => !empty($ev_vals["_evcal_ec_f" . $x . "a1_cusL"]) ? $ev_vals["_evcal_ec_f" . $x . "a1_cusL"][0] : null, '_target' => !empty($ev_vals["_evcal_ec_f" . $x . "_onw"]) ? $ev_vals["_evcal_ec_f" . $x . "_onw"][0] : null, 'type' => $this->evopt1['evcal_ec_f' . $x . 'a2'], 'visibility_type' => !empty($this->evopt1['evcal_ec_f' . $x . 'a4']) ? $this->evopt1['evcal_ec_f' . $x . 'a4'] : 'all');
                        }
                    }
                }
                // LEARN MORE and ICS
                if (!empty($ev_vals['evcal_lmlink']) || !empty($this->evopt1['evo_ics']) && $this->evopt1['evo_ics'] == 'yes') {
                    $_eventcard['learnmoreICS'] = array('event_id' => $event_id, 'learnmorelink' => !empty($ev_vals['evcal_lmlink']) ? $ev_vals['evcal_lmlink'][0] : null, 'learnmore_target' => !empty($ev_vals['evcal_lmlink_target']) && $ev_vals['evcal_lmlink_target'][0] == 'yes' ? 'target="_blank"' : null, 'estart' => $event_start_unix, 'eend' => $event_end_unix, 'etitle' => $event->post_title, 'excerpt' => !empty($event_full_description) ? eventon_get_normal_excerpt($event_full_description, 30) : $event->post_title, 'evals' => $ev_vals);
                }
                // =======================
                /** CONSTRUCT the EVENT CARD	 **/
                if ($_event_card_on && !empty($_eventcard) && count($_eventcard) > 0) {
                    // filter hook for eventcard content array - updated 2.2.20
                    $_eventcard = apply_filters('eventon_eventcard_array', $_eventcard, $ev_vals, $event_id, $__repeatInterval);
                    // if an order is set reorder things
                    if (!empty($this->evopt1['evoCard_order'])) {
                        $_eventcard = $this->helper->eventcard_sort($_eventcard, $this->evopt1);
                    }
                    ob_start();
                    echo "<div class='event_description evcal_eventcard " . ($_is_eventCardOpen ? 'open' : null) . "' " . ($_is_eventCardOpen ? 'style="display:block"' : 'style="display:none"') . ">";
                    echo eventon_eventcard_print($_eventcard, $this->evopt1, $this->evopt2);
                    // (---) hook for addons
                    do_action('eventon_eventcard_additions', $event_id, $this->__calendar_type, $event->post_title, $event_full_description, $img_thumb_src, $__repeatInterval);
                    echo "</div>";
                    $html_event_detail_card = ob_get_clean();
                }
                /** Trigger attributes **/
                $event_description_trigger = "desc_trig";
                $_eventInAttr['data-gmtrig'] = !empty($ev_vals['evcal_gmap_gen']) && $ev_vals['evcal_gmap_gen'][0] == 'yes' ? '1' : '0';
                // Generate tax terms for event top
                $html_event_type_tax_ar = array();
                $_tax_names_array = evo_get_localized_ettNames('', $this->evopt1, $this->evopt2);
                //$_tax_names_array = evo_get_ettNames($this->evopt1);
                //print_r($_tax_names_array);
                $evcal_terms_ = '';
                // event _type 1 terms - this is also used for etc_override
                $ett_terms = wp_get_post_terms($event_id, 'event_type');
                if (!empty($eventop_fields)) {
                    // foreach active tax
                    for ($b = 1; $b <= $_active_tax; $b++) {
                        $__tx_content = '';
                        $__tax_slug = 'event_type' . ($b == 1 ? '' : '_' . $b);
                        $__tax_fields = 'eventtype' . ($b == 1 ? '' : $b);
                        if (in_array($__tax_fields, $eventop_fields)) {
                            $evcal_terms = !empty($evcal_terms_) && $b == 1 ? $ett_terms : wp_get_post_terms($event_id, $__tax_slug);
                            if ($evcal_terms) {
                                $__tax_name = $_tax_names_array[$b];
                                $__tx_content .= "<span class='evcal_event_types ett{$b}'><em><i>" . $__tax_name . ":</i></em>";
                                $i = 1;
                                foreach ($evcal_terms as $termA) {
                                    // get translated tax term name
                                    $term_name = $this->lang('evolang_' . $__tax_slug . '_' . $termA->term_id, $termA->name);
                                    // tax term slug as class name
                                    $_eventInClasses[] = 'evo_' . $termA->slug;
                                    $__tx_content .= "<em data-filter='{$__tax_slug}'>" . $term_name . (count($evcal_terms) != $i ? ',' : '') . "</em>";
                                    $i++;
                                }
                                $__tx_content .= "<i class='clear'></i></span>";
                                $html_event_type_tax_ar[$b] = $__tx_content;
                            }
                        }
                    }
                }
                $_html_tax_content = count($html_event_type_tax_ar) > 0 ? implode('', $html_event_type_tax_ar) : null;
                // event color
                $event_color = eventon_get_hex_color($ev_vals, $default_event_color);
                // override event colors
                if (!empty($__shortC_arg['etc_override']) && $__shortC_arg['etc_override'] == 'yes' && !empty($ett_terms)) {
                    $ev_id = $ett_terms[0]->term_id;
                    $ev_color = get_option("evo_et_taxonomy_{$ev_id}");
                    $event_color = !empty($ev_color['et_color']) ? $ev_color['et_color'] : $event_color;
                    // remove additional '#' in the hex code
                    $event_color = '#' . str_replace('#', '', $event_color);
                }
                // if UX to be open in new window then use link to single event or that link
                $link_append = array();
                $_link_text = '';
                if (!empty($__shortC_arg['lang']) && $__shortC_arg['lang'] != 'L1') {
                    $link_append['l'] = $__shortC_arg['lang'];
                }
                // append repeat interval value to event link
                $link_append['ri'] = $__repeatInterval;
                if (!empty($link_append)) {
                    foreach ($link_append as $lp => $lpk) {
                        if ($lp == 'ri' && $lpk == '0') {
                            continue;
                        }
                        $_link_text .= $lp . '=' . $lpk . '&';
                    }
                }
                // passing URL variables values
                $_link_text_append = strpos($event_permalink, '?') === false ? '?' : '&';
                $_link_text = !empty($_link_text) ? $_link_text_append . $_link_text : null;
                $_eventInAttr['rest'][] = !empty($ev_vals['evcal_exlink']) && $event_ux_val != '1' ? 'data-exlk="1" href="' . $ev_vals['evcal_exlink'][0] . $_link_text . '"' : 'data-exlk="0"';
                // target
                $_eventInAttr['rest'][] = !empty($ev_vals['_evcal_exlink_target']) && $ev_vals['_evcal_exlink_target'][0] == 'yes' ? 'target="_blank"' : null;
                // EVENT LOCATION
                if (evo_location_exists($ev_vals)) {
                    $location_address = !empty($ev_vals['evcal_location']) ? $ev_vals['evcal_location'][0] : null;
                    // location as LON LAT
                    $event_location_variables = (!empty($lonlat) ? $lonlat : null) . ' data-location_address="' . $location_address . '" ';
                    // conditional schema data for event
                    if (!empty($this->evopt1['evo_schema']) && $this->evopt1['evo_schema'] == 'yes') {
                        $__scheme_data_location = '';
                    } else {
                        $__scheme_data_location = '
									<item style="display:none" itemprop="location" itemscope itemtype="http://schema.org/Place">
										' . (!empty($__location_name) ? '<span itemprop="name">' . $__location_name . '</span>' : '') . '
										<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
											<item itemprop="streetAddress">' . $location_address . '</item>
										</span>
									</item>';
                    }
                    $ev_location = !empty($location_address) ? '<em class="evcal_location" ' . (!empty($lonlat) ? $lonlat : null) . ' data-add_str="' . $location_address . '">' . $location_address . '</em>' : null;
                    // location type
                    $event_location_variables .= !empty($lonlat) ? 'data-location_type="lonlat"' : 'data-location_type="address"';
                    // location name
                    $event_location_variables .= !empty($ev_vals['evcal_location_name']) ? ' data-location_name="' . $ev_vals['evcal_location_name'][0] . '"' : null;
                    // location status
                    $event_location_variables .= ' data-location_status="true"';
                } else {
                    // location status
                    $ev_location = $event_location_variables = $__scheme_data_location = null;
                    $event_location_variables .= ' data-location_status="false"';
                }
                // EVENT tags
                $_event_tags = wp_get_post_tags($event_id);
                // EVENT TOP
                $eventtop_html = $eventop_fields_ = $__eventtop = '';
                // CHECK for event top fields array
                $eventop_fields_ = is_array($eventop_fields) ? true : false;
                // featured image
                if (!empty($img_thumb_src) && !empty($__shortC_arg['show_et_ft_img']) && $__shortC_arg['show_et_ft_img'] == 'yes') {
                    $__eventtop['ft_img'] = array('url' => $img_thumb_src[0], 'url_med' => !empty($img_med_src[0]) ? $img_med_src[0] : '');
                }
                // date block
                if (!$__year_long_event) {
                    // date number
                    $___day_name = $eventop_fields_ && in_array('dayname', $eventop_fields) ? "<em class='evo_day' >" . $DATE_start_val['D'] . "</em>" : null;
                    $__eventtop['day_block'] = array('start' => $DATE_start_val, 'color' => $event_color, 'day_name' => $___day_name, 'html' => $_event_date_HTML);
                }
                // event titles
                $__eventtop['titles'] = array('yearlong' => $__year_long_event, 'loc_vars' => $event_location_variables, 'title' => isset($event->post_title) ? $event->post_title : '', 'cancel' => $_eventInClasses['_cancel'], 'cancel_reason' => $this->helper->evo_meta('_cancel_reason', $ev_vals, 'null'), 'subtitle' => !empty($ev_vals['evcal_subtitle']) ? $ev_vals['evcal_subtitle'][0] : null);
                // below title
                $__eventtop['belowtitle'] = array('fields_' => $eventop_fields_, 'fields' => $eventop_fields, 'evvals' => $ev_vals, 'html' => $_event_date_HTML, 'location' => $ev_location, 'locationname' => !empty($ev_vals['evcal_location_name']) ? $ev_vals['evcal_location_name'][0] : null, 'tax' => $_html_tax_content, 'tags' => $_event_tags, 'cmdcount' => $_cmf_count, 'timezone' => !empty($ev_vals['evo_event_timezone']) ? $ev_vals['evo_event_timezone'][0] : null);
                // close eventtop
                $_passVal = array('eventid' => $event_id, 'ri' => $__repeatInterval, 'fields_' => $eventop_fields_, 'fields' => $eventop_fields);
                $__eventtop = apply_filters('eventon_eventtop_one', $__eventtop, $ev_vals, $_passVal);
                $__eventtop['close1'] = array();
                $__eventtop = apply_filters('eventon_eventtop_two', $__eventtop, $ev_vals, $_passVal);
                $__eventtop['close2'] = array();
                // CONSTRUCT event top html
                if (!empty($__eventtop) && count($__eventtop) > 0) {
                    ob_start();
                    echo eventon_get_eventtop_print($__eventtop, $this->evopt1, $this->evopt2);
                    $eventtop_html = ob_get_clean();
                    $eventtop_html = apply_filters('eventon_eventtop_html', $eventtop_html);
                } else {
                    $eventtop_html = null;
                }
                // (---) hook for addons
                $html_info_line = apply_filters('eventon_event_cal_short_info_line', $eventtop_html);
                // SCHEME SEO
                // conditional schema data
                if (!empty($this->evopt1['evo_schema']) && $this->evopt1['evo_schema'] == 'yes') {
                    // remove schema
                    $__scheme_data = '<div class="evo_event_schema" style="display:none" >
							<a href="' . $event_permalink . '"></a></div>';
                    $__scheme_attributes = '';
                } else {
                    $event_permalink = $_sin_ev_ex ? $event_permalink . $_link_text : "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
                    $__scheme_data = '<div class="evo_event_schema" style="display:none" >
							<a href="' . $event_permalink . '" itemprop="url"></a>				
							<time itemprop="startDate" datetime="' . $DATE_start_val['Y'] . '-' . $DATE_start_val['n'] . '-' . $DATE_start_val['j'] . '"></time>
							<time itemprop="endDate" datetime="' . $DATE_end_val['Y'] . '-' . $DATE_end_val['n'] . '-' . $DATE_end_val['j'] . '"></time>' . $__scheme_data_location . '</div>';
                    $__scheme_attributes = "itemscope itemtype='http://schema.org/Event'";
                }
                // CLASES - attribute
                $_eventClasses[] = 'eventon_list_event';
                $_eventClasses[] = isset($event_['event_past']) && $event_['event_past'] ? 'past_event' : '';
                $_eventClasses[] = 'event';
                $_eventInClasses[] = $_event_date_HTML['class_daylength'];
                $_eventInClasses[] = 'evcal_list_a';
                $_eventInClasses_ = $this->helper->get_eventinclasses(array('existing_classes' => $_eventInClasses, 'show_et_ft_img' => !empty($__shortC_arg['show_et_ft_img']) ? $__shortC_arg['show_et_ft_img'] : 'no', 'img_thumb_src' => $img_thumb_src, 'event_type' => $event_type, 'event_description_trigger' => $event_description_trigger));
                // show limit styles
                if (!empty($__shortC_arg['show_limit']) && $__shortC_arg['show_limit'] == 'yes' && !empty($__shortC_arg['event_count']) && $__shortC_arg['event_count'] > 0 && $__count > $__shortC_arg['event_count']) {
                    $_eventAttr['style'][] = "display:none;";
                    $_eventClasses[] = 'evSL';
                }
                $eventbefore = '';
                // TILES STYLE
                if (!empty($__shortC_arg['tiles']) && $__shortC_arg['tiles'] == 'yes') {
                    // boxy event colors
                    // if featured image exists for an event
                    if (!empty($img_med_src) && $__shortC_arg['tile_bg'] == 1) {
                        $_this_style = 'background-image: url(' . $img_med_src[0] . '); background-color:' . $event_color . ';';
                        $_eventClasses[] = 'hasbgimg';
                    } else {
                        $_this_style = 'background-color: ' . $event_color . ';';
                    }
                    // support different tile style
                    if (!empty($__shortC_arg['tile_style']) && $__shortC_arg['tile_style'] != '0') {
                        $eventbefore = '<div class="evo_topbar" style="' . $_this_style . '"></div>';
                    } else {
                        $_eventAttr['style'][] = $_this_style;
                    }
                    // tile height
                    if ($__shortC_arg['tile_height'] != 0) {
                        $_eventAttr['style'][] = 'height: ' . $__shortC_arg['tile_height'] . 'px;';
                    }
                    // tile count
                    if ($__shortC_arg['tile_count'] != 2) {
                        //$perct = (int)(100/$__shortC_arg['tile_count']);
                        //$_eventAttr['style'][] = 'width: '.$perct.'%;';
                    }
                } else {
                    $_eventInAttr['style'][] = 'border-color: ' . $event_color . ';';
                }
                $_eventAttr['id'] = 'event_' . $event_id;
                $_eventAttr['class'] = $this->helper->implode($_eventClasses);
                $_eventAttr['data-event_id'] = $event_id;
                $_eventAttr['data-ri'] = $__repeatInterval;
                $_eventAttr['data-colr'] = $event_color;
                $_eventAttr['rest'][] = $__scheme_attributes;
                $atts = $this->helper->get_attrs($_eventAttr);
                $_eventInAttr['id'] = $unique_id;
                $_eventInAttr['class'] = $_eventInClasses_;
                $_eventInAttr['data-ux_val'] = $event_ux_val;
                $attsIn = $this->helper->get_attrs($_eventInAttr);
                // event item html
                $html_tag_start = $html_tag == 'a' ? 'p class="desc_trig_outter"><a' : $html_tag;
                $html_tag_end = $html_tag == 'a' ? 'p></a' : $html_tag;
                // build the event HTML
                $event_html_code = "<div {$atts}>{$eventbefore}{$__scheme_data}\n\t\t\t\t<{$html_tag_start} {$attsIn}>{$html_info_line}</{$html_tag_end}>" . $html_event_detail_card . "<div class='clear end'></div></div>";
                // prepare output
                $months_event_array[] = array('event_id' => $event_id, 'srow' => $event_start_unix, 'erow' => $event_end_unix, 'content' => $event_html_code);
            }
        } else {
            $months_event_array;
        }
        return $months_event_array;
    }
    function add_social_media_to_eventcard($event_id, $cal_type, $title, $event_full_description, $img, $__repeatInterval)
    {
        global $eventon;
        $__calendar_type = $eventon->evo_generator->__calendar_type;
        $evo_opt = $this->evo_opt;
        // check if social media to show or not
        if (!empty($evo_opt['evosm_som']) && $evo_opt['evosm_som'] == 'yes' && $__calendar_type == 'single' || empty($evo_opt['evosm_som']) || !empty($evo_opt['evosm_som']) && $evo_opt['evosm_som'] == 'no') {
            $post_title = $title;
            $permalink = urlencode(get_permalink($event_id));
            $permalinkCOUNT = get_permalink($event_id);
            // append repeat interval
            $permalinkCOUNT = esc_url(add_query_arg('ri', $__repeatInterval, $permalinkCOUNT));
            $title = str_replace('+', '%20', urlencode($post_title));
            $titleCOUNT = $post_title;
            $summary = !empty($event_full_description) ? urlencode(eventon_get_normal_excerpt($event_full_description, 16)) : '--';
            $imgurl = !empty($img) ? urlencode($img[0]) : '';
            //$app_id = '486365788092310';
            // social media array
            $fb_js = "javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;";
            $tw_js = "javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;";
            $gp_js = "javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;";
            $social_sites = apply_filters('evo_se_social_media', array('FacebookShare' => array('key' => 'eventonsm_fbs', 'counter' => 1, 'favicon' => 'likecounter.png', 'url' => '<a class="fb evo_ss" target="_blank" 
							onclick="' . $fb_js . '"
							href="http://www.facebook.com/sharer.php?s=100&p[url]=PERMALINK&p[title]=TITLE&display=popup" data-url="PERMALINK"><i class="fa fa-facebook"></i></a>'), 'Twitter' => array('key' => 'eventonsm_tw', 'counter' => 1, 'favicon' => 'twitter.png', 'url' => '<a class="tw evo_ss" onclick="' . $tw_js . '" href="http://twitter.com/share?text=TITLECOUNT - PERMALINK" title="Share on Twitter" rel="nofollow" target="_blank" data-url="PERMALINK"><i class="fa fa-twitter"></i></a>'), 'LinkedIn' => array('key' => 'eventonsm_ln', 'counter' => 1, 'favicon' => 'linkedin.png', 'url' => '<a class="li evo_ss" href="http://www.linkedin.com/shareArticle?mini=true&url=PERMALINKCOUNT&title=TITLE&summary=SUMMARY" target="_blank"><i class="fa fa-linkedin"></i></a>'), 'Google' => array('key' => 'eventonsm_gp', 'counter' => 1, 'favicon' => 'google.png', 'url' => '<a class="gp evo_ss" href="https://plus.google.com/share?url=PERMALINKCOUNT" 
							onclick="' . $fb_js . '" target="_blank"><i class="fa fa-google-plus"></i></a>'), 'Pinterest' => array('key' => 'eventonsm_pn', 'counter' => 1, 'favicon' => 'pinterest.png', 'url' => '<a class="pn evo_ss" href="http://www.pinterest.com/pin/create/button/?url=PERMALINK&media=IMAGEURL&description=SUMMARY"
					        data-pin-do="buttonPin" data-pin-config="above" target="_blank"><i class="fa fa-pinterest"></i></a>')));
            $sm_count = 0;
            $output_sm = '';
            foreach ($social_sites as $sm_site => $sm_site_val) {
                if (!empty($evo_opt[$sm_site_val['key']]) && $evo_opt[$sm_site_val['key']] == 'yes') {
                    if ($sm_site == 'Pinterest' && !empty($imgurl) || $sm_site != 'Pinterest') {
                        $site = $sm_site;
                        $url = $sm_site_val['url'];
                        $url = str_replace('TITLECOUNT', $titleCOUNT, $url);
                        $url = str_replace('TITLE', $title, $url);
                        $url = str_replace('PERMALINKCOUNT', $permalinkCOUNT, $url);
                        $url = str_replace('PERMALINK', $permalink, $url);
                        $url = str_replace('SUMMARY', $summary, $url);
                        $url = str_replace('IMAGEURL', $imgurl, $url);
                        $linkitem = '';
                        $style = '';
                        $target = '';
                        $href = $url;
                        if ($sm_site == 'FacebookShare') {
                            ob_start();
                            ?>
								
								<?php 
                            echo ob_get_clean();
                        }
                        $link = "<div class='evo_sm " . $sm_site . "'>" . $href . "</div>";
                        $output_sm .= $link;
                        $sm_count++;
                    }
                }
            }
            if ($sm_count > 0) {
                echo "<div class='bordb evo_metarow_socialmedia evcal_evdata_row'>\r\n\t\t\t\t\t\t\t" . $output_sm . "<div class='clear'></div>\r\n\t\t\t\t\t\t</div>";
            }
        }
        $eventon->evo_generator->__calendar_type = 'default';
        //return $row;
    }
Example #3
0
    function add_social_media_to_eventcard($object, $helpers)
    {
        global $eventon;
        $__calendar_type = $eventon->evo_generator->__calendar_type;
        $evo_opt = $helpers['evOPT'];
        $event_id = $object->event_id;
        // check if social media to show or not
        if (!empty($evo_opt['evosm_som']) && $evo_opt['evosm_som'] == 'yes' && $__calendar_type == 'single' || empty($evo_opt['evosm_som']) || !empty($evo_opt['evosm_som']) && $evo_opt['evosm_som'] == 'no') {
            $post_title = get_the_title($event_id);
            $permalink = urlencode(get_permalink($event_id));
            $permalinkCOUNT = get_permalink($event_id);
            // append repeat interval
            //$permalinkCOUNT = esc_url( add_query_arg('ri',$object->__repeatInterval,$permalinkCOUNT) );
            $permalink_connector = strpos($permalinkCOUNT, '?') !== false ? '&' : '?';
            $permalinkCOUNT = !empty($object->__repeatInterval) && $object->__repeatInterval > 0 ? $permalinkCOUNT . $permalink_connector . 'ri=' . $object->__repeatInterval : $permalinkCOUNT;
            //$encodeURL = ($permalinkCOUNT);
            $encodeURL = urlencode($permalinkCOUNT);
            // thumbnail
            $img_id = get_post_thumbnail_id($event_id);
            $img_src = $img_id ? wp_get_attachment_image_src($img_id, 'thumbnail') : false;
            // event details
            $summary = $eventon->frontend->filter_evo_content(get_post_field('post_content', $event_id));
            $title = str_replace('+', '%20', urlencode($post_title));
            $titleCOUNT = $post_title;
            $summary = !empty($summary) ? urlencode(eventon_get_normal_excerpt($summary, 16)) : '--';
            $imgurl = $img_src ? urlencode($img_src[0]) : '';
            //$app_id = '486365788092310';
            // social media array
            $fb_js = "javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;";
            $tw_js = "javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;";
            $gp_js = "javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;";
            $social_sites = apply_filters('evo_se_social_media', array('FacebookShare' => array('key' => 'eventonsm_fbs', 'counter' => 1, 'favicon' => 'likecounter.png', 'url' => '<a class="fb evo_ss" target="_blank" 
								onclick="' . $fb_js . '"
								href="http://www.facebook.com/sharer.php?s=100&p[url]=PERMALINK&p[title]=TITLE&display=popup" data-url="PERMALINK"><i class="fa fa-facebook"></i></a>'), 'Twitter' => array('key' => 'eventonsm_tw', 'counter' => 1, 'favicon' => 'twitter.png', 'url' => '<a class="tw evo_ss" onclick="' . $tw_js . '" href="http://twitter.com/share?text=TITLECOUNT" title="Share on Twitter" rel="nofollow" target="_blank" data-url="PERMALINK"><i class="fa fa-twitter"></i></a>'), 'LinkedIn' => array('key' => 'eventonsm_ln', 'counter' => 1, 'favicon' => 'linkedin.png', 'url' => '<a class="li evo_ss" href="http://www.linkedin.com/shareArticle?mini=true&url=PERMALINK&title=TITLE&summary=SUMMARY" target="_blank"><i class="fa fa-linkedin"></i></a>'), 'Google' => array('key' => 'eventonsm_gp', 'counter' => 1, 'favicon' => 'google.png', 'url' => '<a class="gp evo_ss" href="https://plus.google.com/share?url=PERMALINK" 
								onclick="' . $fb_js . '" target="_blank"><i class="fa fa-google-plus"></i></a>'), 'Pinterest' => array('key' => 'eventonsm_pn', 'counter' => 1, 'favicon' => 'pinterest.png', 'url' => '<a class="pn evo_ss" href="http://www.pinterest.com/pin/create/button/?url=PERMALINK&media=IMAGEURL&description=SUMMARY"
						        data-pin-do="buttonPin" data-pin-config="above" target="_blank"><i class="fa fa-pinterest"></i></a>'), 'EmailShare' => array('key' => 'eventonsm_email', 'url' => '<a class="em evo_ss" href="HREF" target="_blank"><i class="fa fa-envelope"></i></a>')));
            $sm_count = 0;
            $output_sm = '';
            // foreach sharing option
            foreach ($social_sites as $sm_site => $sm_site_val) {
                if (!empty($evo_opt[$sm_site_val['key']]) && $evo_opt[$sm_site_val['key']] == 'yes') {
                    // for emailing
                    if ($sm_site == 'EmailShare') {
                        $url = $sm_site_val['url'];
                        $href_ = 'mailto:name@domain.com?subject=' . $title . '&body=' . $encodeURL;
                        $url = str_replace('HREF', $href_, $url);
                        $link = "<div class='evo_sm " . $sm_site . "'>" . $url . "</div>";
                        $output_sm .= $link;
                        $sm_count++;
                    } else {
                        // check interest
                        if ($sm_site == 'Pinterest' && empty($imgurl)) {
                            continue;
                        }
                        $site = $sm_site;
                        $url = $sm_site_val['url'];
                        $url = str_replace('TITLECOUNT', $titleCOUNT, $url);
                        $url = str_replace('TITLE', $title, $url);
                        $url = str_replace('PERMALINKCOUNT', $permalinkCOUNT, $url);
                        $url = str_replace('PERMALINK', $encodeURL, $url);
                        $url = str_replace('SUMMARY', $summary, $url);
                        $url = str_replace('IMAGEURL', $imgurl, $url);
                        $linkitem = '';
                        $style = '';
                        $target = '';
                        $href = $url;
                        if ($sm_site == 'FacebookShare') {
                        }
                        $link = "<div class='evo_sm " . $sm_site . "'>" . $href . "</div>";
                        $output_sm .= $link;
                        $sm_count++;
                    }
                }
            }
            if ($sm_count > 0) {
                return "<div class='bordb evo_metarow_socialmedia evcal_evdata_row'>" . $output_sm . "<div class='clear'></div></div>";
            }
        }
        $eventon->evo_generator->__calendar_type = 'default';
    }