function widget($args, $instance) { global $wpdb, $current_site, $post, $wiki_tree; extract($args); $instance = apply_filters('eab-widgets-upcoming-instance_read', $instance, $this); $options = wp_parse_args((array) $instance, $this->_defaults); $title = apply_filters('widget_title', empty($instance['title']) ? __('Upcoming', $this->translation_domain) : $instance['title'], $instance, $this->id_base); $query_args = array('posts_per_page' => $options['limit']); if ($options['category']) { $query_args['tax_query'] = array(array('taxonomy' => 'eab_events_category', 'field' => 'id', 'terms' => (int) $options['category'])); } if ($options['lookahead'] && is_numeric($options['lookahead'])) { $lookahead_func = create_function('', 'return ' . $options['lookahead'] . ';'); add_filter('eab-collection-upcoming_weeks-week_number', $lookahead_func); } $_events = Eab_CollectionFactory::get_upcoming_weeks_events(eab_current_time(), $query_args); if (!empty($lookahead_func)) { remove_filter('eab-collection-upcoming_weeks-week_number', $lookahead_func); } if (is_array($_events) && count($_events) > 0) { echo $before_widget; echo $before_title . $title . $after_title; echo '<div id="event-popular"><ul>'; foreach ($_events as $_event) { $thumbnail = $excerpt = false; if ($options['thumbnail']) { $raw = wp_get_attachment_image_src(get_post_thumbnail_id($_event->get_id())); $thumbnail = $raw ? @$raw[0] : false; } $excerpt = false; if (!empty($options['excerpt'])) { $words = (int) $options['excerpt_words_limit'] ? (int) $options['excerpt_words_limit'] : false; $excerpt = eab_call_template('util_words_limit', $_event->get_excerpt_or_fallback(), $words); } echo '<li>'; echo '<a href="' . get_permalink($_event->get_id()) . '" class="' . ($_event->get_id() == $post->ID ? 'current' : '') . '" >' . ($options['thumbnail'] && $thumbnail ? '<img src="' . $thumbnail . '" /><br />' : '') . $_event->get_title() . '</a>'; if (!empty($options['dates'])) { echo '<div class="wpmudevevents-date">' . Eab_Template::get_event_dates($_event) . '</div>'; } if (!empty($options['excerpt']) && !empty($excerpt)) { echo '<p>' . $excerpt . '</p>'; } do_action('eab-widgets-upcoming-after_event', $options, $_event, $this); echo '</li>'; } echo '</ul></div>'; echo $after_widget; } else { echo $before_widget . $before_title . $title . $after_title . '<p class="eab-widget-no_events">' . __('No upcoming events.', Eab_EventsHub::TEXT_DOMAIN) . '</p>' . $after_widget; } }
function widget($args, $instance) { global $wpdb, $current_site, $post, $wiki_tree; extract($args); if ($post->post_type != 'incsub_event') { return; } $options = $instance; $event = new Eab_EventModel($post); $title = apply_filters('widget_title', empty($instance['title']) ? __('Attendees', $this->translation_domain) : $instance['title'], $instance, $this->id_base); if (is_single() && $event->has_bookings()) { ?> <?php echo $before_widget; ?> <?php echo $before_title . $title . $after_title; ?> <div id="event-bookings"> <div id="event-booking-yes"> <?php echo Eab_Template::get_bookings(Eab_EventModel::BOOKING_YES, $event); ?> </div> <div class="clear"></div> <div id="event-booking-maybe"> <?php echo Eab_Template::get_bookings(Eab_EventModel::BOOKING_MAYBE, $event); ?> </div> </div> <br /> <?php echo $after_widget; ?> <?php } ?> <?php }
function get_recurring_content($post, $content = false) { $event = $post instanceof Eab_EventModel ? $post : new Eab_EventModel($post); if ('incsub_event' != $event->get_type()) { return $content; } $start_day = date_i18n('m', $event->get_start_timestamp()); $network = $event->from_network(); $link = $network ? get_blog_permalink($network, $event->get_id()) : get_permalink($event->get_id()); $new_content = ''; $new_content .= '<div class="event ' . Eab_Template::get_status_class($event) . '" itemscope itemtype="http://schema.org/Event">'; $new_content .= '<meta itemprop="name" content="' . esc_attr($event->get_title()) . '" />'; $new_content .= '<a href="' . $link . '" class="wpmudevevents-viewevent">' . __('View event', Eab_EventsHub::TEXT_DOMAIN) . '</a>'; $new_content .= apply_filters('eab-template-archive_after_view_link', '', $event); $new_content .= '<div style="clear: both;"></div>'; $new_content .= '<hr />'; $new_content .= '<div id="wpmudevevents-contentbody" itemprop="description">' . ($content ? $content : $event->get_content()) . '</div>'; $new_content .= '<hr />'; $new_content .= Eab_Template::get_event_details($event); $new_content .= Eab_Template::get_rsvp_form($event); $new_content .= '</div>'; $new_content .= '<div style="clear:both"></div>'; return $new_content; }
public static function util_shortcode_argument_type_string($raw_type, $argument, $tag) { $resolved = Eab_Template::_shortcode_arg_type_map_values($raw_type, $argument, $tag); if (empty($resolved['type']) || empty($resolved['title'])) { return "<code>({$raw_type})</code>"; } $title = 'title="' . esc_attr($resolved['title']) . '"'; return "<abbr {$title}>({$resolved['type']})</abbr>"; }
/** * Single event shortcode handler. */ function process_single_shortcode($args = array(), $content = false) { $args = $this->_preparse_arguments($args, array('id' => false, 'slug' => false, 'class' => false, 'template' => 'get_shortcode_single_output', 'override_styles' => false, 'override_scripts' => false)); $args['id'] = $this->_arg_to_int($args['id']); $event = false; if ($args['id']) { $event = new Eab_EventModel(get_post($args['id'])); } else { $q = new WP_Query(array('post_type' => Eab_EventModel::POST_TYPE, 'name' => $args['slug'], 'posts_per_page' => 1)); if (isset($q->posts[0])) { $event = new Eab_EventModel($q->posts[0]); } } if (!$event) { return $content; } $output = Eab_Template::util_apply_shortcode_template($event, $args); $output = $output ? $output : $content; if (!$args['override_styles']) { wp_enqueue_style('eab_front'); } if (!$args['override_scripts']) { wp_enqueue_script('eab_event_js'); do_action('eab-javascript-do_enqueue_api_scripts'); } return $output; }
<?php add_filter('agm_google_maps-options', 'eab_autoshow_map_off', 99); the_content(); remove_filter('agm_google_maps-options', 'eab_autoshow_map_off'); ?> </div> <div><?php echo Eab_Template::get_inline_rsvps($event); ?> </div> </div> </div> <div id="wpmudevevents-right"> <div id="wpmudevevents-attending" class="wpmudevevents-box"> <?php echo Eab_Template::get_rsvp_form($event); ?> </div> <?php if ($event->has_venue_map()) { ?> <div id="wpmudevevents-googlemap" class="wpmudevevents-box"> <div class="wpmudevevents-boxheader"> <h3>Google Map</h3> </div> <div class="wpmudevevents-boxinner"> <?php echo $event->get_venue_location(Eab_EventModel::VENUE_AS_MAP, array('width' => '99%')); ?> </div> </div>
/** * Responds with RSVP form */ function handle_get_form() { $post_id = (int) @$_POST['post_id']; if (!$post_id) { die; } $post = get_post($post_id); echo Eab_Template::get_rsvp_form($post); die; }
private function _get_event_meta_boxes($event) { $ret = '<div id="eab-events-fpe-meta_info">'; $ret .= '<div class="eab-events-fpe-col_wrapper">'; // Date, time $ret .= '<div class="eab-events-fpe-meta_box" id="eab-events-fpe-date_time">'; // Start date/time $start = $event->get_start_timestamp(); $start = $start ? $start : eab_current_time(); $ret .= '<div>'; $ret .= '<label>' . __('Starts on', Eab_EventsHub::TEXT_DOMAIN) . '</label>'; $ret .= ' <input type="text" name="" id="eab-events-fpe-start_date" value="' . date('Y-m-d', $start) . '" size="10" />'; $ret .= ' <input type="text" name="" id="eab-events-fpe-start_time" value="' . date('H:i', $start) . '" size="3" />'; $ret .= '</div>'; // End date/time $end = $event->get_end_timestamp(); $end = $end ? $end : eab_current_time() + 3600; $ret .= '<div>'; $ret .= '<label>' . __('Ends on', Eab_EventsHub::TEXT_DOMAIN) . '</label>'; $ret .= ' <input type="text" name="" id="eab-events-fpe-end_date" value="' . date('Y-m-d', $end) . '" size="10" />'; $ret .= ' <input type="text" name="" id="eab-events-fpe-end_time" value="' . date('H:i', $end) . '" size="3" />'; $ret .= '</div>'; // End date, time, venue $ret .= '</div>'; // Status, type, misc $ret .= '<div class="eab-events-fpe-meta_box" id="eab-events-fpe-status_type">'; // Status $ret .= '<div>'; $ret .= '<label>' . __('Event status', Eab_EventsHub::TEXT_DOMAIN) . '</label>'; $ret .= '<select name="" id="eab-events-fpe-status">'; $ret .= ' <option value="' . Eab_EventModel::STATUS_OPEN . '" ' . ($event->is_open() ? 'selected="selected"' : '') . ' >' . __('Open', Eab_EventsHub::TEXT_DOMAIN) . '</option>'; $ret .= ' <option value="' . Eab_EventModel::STATUS_CLOSED . '" ' . ($event->is_closed() ? 'selected="selected"' : '') . ' >' . __('Closed', Eab_EventsHub::TEXT_DOMAIN) . '</option>'; $ret .= ' <option value="' . Eab_EventModel::STATUS_EXPIRED . '" ' . ($event->is_expired() ? 'selected="selected"' : '') . ' >' . __('Expired', Eab_EventsHub::TEXT_DOMAIN) . '</option>'; $ret .= ' <option value="' . Eab_EventModel::STATUS_ARCHIVED . '" ' . ($event->is_archived() ? 'selected="selected"' : '') . ' >' . __('Archived', Eab_EventsHub::TEXT_DOMAIN) . '</option>'; $ret .= apply_filters('eab-events-fpe-event_meta-extra_event_status', '', $event); $ret .= '</select>'; $ret .= apply_filters('eab-events-fpe-event_meta-after_event_status', '', $event); $ret .= '</div>'; // Type if ($this->_data->get_option('accept_payments')) { $ret .= '<div>'; $ret .= '<label>' . __('Is this a paid event?', Eab_EventsHub::TEXT_DOMAIN) . '</label>'; $ret .= '<select name="" id="eab-events-fpe-is_premium">'; $ret .= ' <option value="1" ' . ($event->is_premium() ? 'selected="selected"' : '') . '>' . __('Yes', Eab_EventsHub::TEXT_DOMAIN) . '</option>'; $ret .= ' <option value="0" ' . ($event->is_premium() ? '' : 'selected="selected"') . '>' . __('No', Eab_EventsHub::TEXT_DOMAIN) . '</option>'; $ret .= '</select>'; $ret .= '<div id="eab-events-fpe-event_fee-wrapper">'; $ret .= '<label for="eab-events-fpe-event_fee">' . __('Fee', Eab_EventsHub::TEXT_DOMAIN) . '</label>'; $ret .= ' <input type="text" name="" id="eab-events-fpe-event_fee" size="6" value="' . esc_attr($event->get_price()) . '" />'; $ret .= '</div>'; // eab-events-fpe-event_fee-wrapper $ret .= '</div>'; } // End status, type, misc $ret .= '</div>'; $ret .= '</div>'; // eab-events-fpe-col_wrapper $ret .= '<div class="eab-events-fpe-col_wrapper">'; // Start Venue $ret .= '<div class="eab-events-fpe-meta_box" id="eab-events-fpe-meta_box-venue">'; // Venue $ret .= '<div>'; $ret .= '<label>' . __('Venue', Eab_EventsHub::TEXT_DOMAIN) . '</label>'; $ret .= '<br /><input type="text" name="" id="eab-events-fpe-venue" value="' . esc_attr($event->get_venue_location()) . '" />'; $ret .= '</div>'; // End venue $ret .= '</div>'; $ret .= '</div>'; // eab-events-fpe-col_wrapper $ret .= '<div class="eab-events-fpe-col_wrapper">'; // Start Categories $event_cat_ids = $event->get_category_ids(); $event_cat_ids = $event_cat_ids ? $event_cat_ids : array(); $all_cats = get_terms('eab_events_category', array('hide_empty' => false)); $all_cats = $all_cats ? $all_cats : array(); $ret .= '<div class="eab-events-fpe-meta_box" id="eab-events-fpe-meta_box-categories">'; // Categories $ret .= '<div>'; $ret .= '<label>' . __('Category', Eab_EventsHub::TEXT_DOMAIN) . '</label>'; $ret .= '<br /><select id="eab-events-fpe-categories"><option value=""></option>'; foreach ($all_cats as $cat) { $selected = in_array($cat->term_id, $event_cat_ids) ? "selected='selected'" : ''; $ret .= "<option value='{$cat->term_id}' {$selected}>{$cat->name}</option>"; } $ret .= "</select>"; $ret .= '</div>'; // End Categories $ret .= '</div>'; $ret .= '</div>'; // eab-events-fpe-col_wrapper $ret .= '<div class="eab-events-fpe-col_wrapper">'; $addons = apply_filters('eab-events-fpe-add_meta', '', $event); if ($addons) { $ret .= '<div class="eab-events-fpe-col_wrapper">'; $ret .= $addons; $ret .= '</div>'; // eab-events-fpe-col_wrapper } $featured_image = $event->get_featured_image_url(); $featured_image_id = (int) $event->get_featured_image_id(); if (current_user_can('upload_files')) { /* Added by Ashok */ $ret .= '<div class="eab-events-fpe-col_wrapper">'; $ret .= '<label>' . __('Feature Image', Eab_EventsHub::TEXT_DOMAIN) . '</label>' . '<br />' . '<a href="#featured_image" class="eab-fpe-upload">' . '<input type="hidden" id="eab-fpe-attach_id" name="" value="' . $featured_image_id . '" />' . '<input type="hidden" name="featured" value="' . esc_attr($featured_image_id) . '" />' . '<img src="' . esc_url($featured_image) . '" id="eab-fpe-preview-upload" ' . (empty($featured_image) ? 'style="display:none"' : '') . ' />' . '<br />' . '<span>' . __('Change the featured image', Eab_EventsHub::TEXT_DOMAIN) . '</span>' . '</a>'; $ret .= '</div>'; /* End of adding by Ashok */ } else { if (!empty($featured_image_id) && !empty($featured_image)) { $ret .= '<div class="eab-events-fpe-col_wrapper">'; $ret .= '<label>' . __('Feature Image', Eab_EventsHub::TEXT_DOMAIN) . '</label>' . '<img src="' . esc_url($featured_image) . '" id="eab-fpe-preview-upload" />' . '<input type="hidden" id="eab-fpe-attach_id" name="featured" value="' . esc_attr($featured_image_id) . '" />' . '</div>'; } } // OK/Cancel $ok_label = $event->get_id() ? __('Update', Eab_EventsHub::TEXT_DOMAIN) : __('Publish', Eab_EventsHub::TEXT_DOMAIN); $ret .= '<div id="eab-events-fpe-ok_cancel">'; $ret .= '<input type="button" class="button button-primary" id="eab-events-fpe-ok" value="' . esc_attr($ok_label) . '" />'; $ret .= '<input type="button" class="button" id="eab-events-fpe-cancel" value="' . esc_attr(__('Cancel', Eab_EventsHub::TEXT_DOMAIN)) . '" />'; $ret .= '</div>'; $ret .= '</div>'; // eab-events-fpe-col_wrapper $ret .= '<div class="eab-events-fpe-col_wrapper">'; // RSVPs $ret .= '<div class="eab-events-fpe-meta_box" id="eab-events-fpe-rsvps">'; if ($event->has_bookings()) { $ret .= '<a href="#toggle_rsvps" id="eab-events-fpe-toggle_rsvps">' . __('Toggle RSVPs', Eab_EventsHub::TEXT_DOMAIN) . '</a>'; $ret .= '<div id="eab-events-fpe-rsvps-wrapper" style="display:none">'; $ret .= Eab_Template::get_admin_attendance_addition_form($event, Eab_Template::get_rsvp_status_list()); $ret .= '<div>'; $ret .= Eab_Template::get_admin_bookings(Eab_EventModel::BOOKING_YES, $event); $ret .= '</div>'; $ret .= '<div>'; $ret .= Eab_Template::get_admin_bookings(Eab_EventModel::BOOKING_MAYBE, $event); $ret .= '</div>'; $ret .= '<div>'; $ret .= Eab_Template::get_admin_bookings(Eab_EventModel::BOOKING_NO, $event); $ret .= '</div>'; $ret .= '</div>'; //eab-events-fpe-rsvps-wrapper } else { $ret .= Eab_Template::get_admin_attendance_addition_form($event, Eab_Template::get_rsvp_status_list()); } // End RSVPs $ret .= '</div>'; $ret .= '</div>'; // eab-events-fpe-col_wrapper $ret .= '</div>'; return $ret; }
protected function _get_item_data($post) { $event = $post instanceof Eab_EventModel ? $post : new Eab_EventModel($post); $event_starts = $event->get_start_dates(); $event_ends = $event->get_end_dates(); $user_data = get_userdata($event->get_author()); if ($user_data->display_name) { $author_name = $user_data->display_name; } else { if ($user_data->first_name or $user_data->last_name) { $author_name = $user_data->first_name . " " . $user_data->last_name; } else { $author_name = $user_data->user_login; } } $res = array('id' => $event->get_id(), 'title' => $event->get_title(), 'event_starts' => $event_starts, 'event_ends' => $event_ends, 'status_class' => Eab_Template::get_status_class($event), 'event_venue' => $event->get_venue_location(), 'event_author' => $author_name, 'author_avatar' => get_avatar($user_data->ID, 72), 'author_bio' => $user_data->description, 'event_content' => strip_shortcodes($event->get_content())); if (isset($post->blog_id)) { $res['blog_id'] = $post->blog_id; } return $res; }
echo Eab_Template::get_event_link($post); ?> </h3> <a href="<?php the_permalink(); ?> " class="wpmudevevents-viewevent"><?php _e('View event', Eab_EventsHub::TEXT_DOMAIN); ?> </a> </div> <?php echo Eab_Template::get_event_details($post); ?> <?php echo Eab_Template::get_rsvp_form($post); ?> <hr /> </div> <?php } ?> </div> <?php } ?> </div> </div> </div> <?php get_footer('event');
<h3><?php _e('About this event:', Eab_EventsHub::TEXT_DOMAIN); ?> </h3> <div id="wpmudevevents-user"><?php _e('Created by ', Eab_EventsHub::TEXT_DOMAIN); the_author_link(); ?> </div> </div> <hr /> <div class="wpmudevevents-contentmeta"> <?php echo Eab_Template::get_event_details($post); //event_details(); ?> </div> <div id="wpmudevevents-contentbody"> <?php add_filter('agm_google_maps-options', 'eab_autoshow_map_off', 99); the_content(); remove_filter('agm_google_maps-options', 'eab_autoshow_map_off'); ?> <?php if ($event->has_venue_map()) { ?> <div class="wpmudevevents-map"><?php echo $event->get_venue_location(Eab_EventModel::VENUE_AS_MAP); ?>
echo sprintf(__('Events for %s', Eab_EventsHub::TEXT_DOMAIN), date_i18n("F Y", $time)); ?> </h2> <div class="wpmudevevents-list"> <?php if (!class_exists('Eab_CalendarTable_EventArchiveCalendar')) { require_once EAB_PLUGIN_DIR . 'lib/class_eab_calendar_helper.php'; } $renderer = new Eab_CalendarTable_EventArchiveCalendar($wp_query->posts); echo $renderer->get_month_calendar($time); ?> <div class="event-pagination"> <?php $prev = $time - 28 * 86400; $next = $time + 32 * 86400; ?> <a href="<?php echo Eab_Template::get_archive_url($prev, true); ?> ">Prev</a> <a href="<?php echo Eab_Template::get_archive_url($next, true); ?> ">Next</a> </div> </div> </div> </div> <?php get_footer('event');
function meta_box_part_bookings($post) { $event = new Eab_EventModel($post); $content = ''; $content .= '<div id="eab-bookings-response">'; $content .= '<input type="hidden" name="incsub_event_bookings_meta" value="1" />'; $content .= '<div class="bookings-list-left">'; $content .= Eab_Template::get_admin_attendance_addition_form($event, Eab_Template::get_rsvp_status_list()); if (!$event->is_recurring() && $event->has_bookings(false) || $event->is_recurring() && $event->has_child_bookings(false)) { $content .= '<div id="event-booking-yes">'; $content .= Eab_Template::get_admin_bookings(Eab_EventModel::BOOKING_YES, $event); $content .= '</div>'; $content .= '<div id="event-booking-maybe">'; $content .= Eab_Template::get_admin_bookings(Eab_EventModel::BOOKING_MAYBE, $event); $content .= '</div>'; $content .= '<div id="event-booking-no">'; $content .= Eab_Template::get_admin_bookings(Eab_EventModel::BOOKING_NO, $event); $content .= '</div>'; $content .= apply_filters('eab-metabox-bookings-has_bookings', '', $event); } else { $content .= __('No bookings', self::TEXT_DOMAIN); } $content .= '</div>'; $content .= '<div class="clear"></div>'; $content .= '</div>'; return $content; }
function process_list_rsvps() { global $post; $post = get_post($_REQUEST['pid']); echo Eab_Template::get_rsvps($post); exit(0); }
protected function _get_navigation_row($position) { if (!$this->_navigation) { return false; } global $post; $time = $this->get_timestamp(); $calendar_class = $this->get_calendar_class(); $row_class = "eab-calendar-title {$calendar_class}-title-{$position}"; $short_attribute = $this->_short_title_format ? 'datetime="' . esc_attr(date_i18n($this->_short_title_format, $time)) . '"' : ''; $title_format = 'top' == $position ? date_i18n($this->_title_format, $time) : date_i18n($this->_title_format, $time); $title_link = '<a href="' . Eab_Template::get_archive_url($time, true) . '" class="' . $calendar_class . '-navigation-link eab-cuw-calendar_date">' . "<time {$short_attribute}>" . "<span>{$title_format}</span>" . '</time>' . '</a>'; $positional_id = $this->_track ? esc_attr('eab-calendar-' . preg_replace('/[^-_a-z0-9]/', '-', $calendar_class)) : ''; $id_attr = $this->_track ? "id='{$positional_id}'" : ''; $id_href = $this->_track ? "#{$positional_id}" : ''; $title = 'top' == $position ? "<h4 {$id_attr}>{$title_link}</h4>" : "<b>{$title_link}</b>"; return "<tr class='{$row_class}'>" . '<td>' . '<a class="' . $calendar_class . '-navigation-link eab-navigation-prev eab-time_unit-year" href="' . esc_url(add_query_arg('date', date('Y-m', $time - 366 * 86400))) . $id_href . '">' . ' «' . '</a>' . '</td>' . '<td>' . '<a class="' . $calendar_class . '-navigation-link eab-navigation-prev eab-time_unit-month" href="' . esc_url(add_query_arg('date', date('Y-m', $time - 28 * 86400))) . $id_href . '">' . ' ‹' . '</a>' . '</td>' . '<td colspan="3" style="text-align:center;">' . '<input type="hidden" class="eab-cuw-calendar_date" value="' . $time . '" />' . $title . '</td>' . '<td>' . '<a class="' . $calendar_class . '-navigation-link eab-navigation-next eab-time_unit-month" href="' . esc_url(add_query_arg('date', date('Y-m', $time + 32 * 86400))) . $id_href . '">' . '› ' . '</a>' . '</td>' . '<td>' . '<a class="' . $calendar_class . '-navigation-link eab-navigation-next eab-time_unit-year" href="' . esc_url(add_query_arg('date', date('Y-m', $time + 366 * 86400))) . $id_href . '">' . '» ' . '</a>' . '</td>' . '</tr>'; }
function process_my_events_shortcode($args = array(), $content = false) { $args = $this->_preparse_arguments($args, array('user' => false, 'class' => 'eab-my_events', 'show_titles' => 'yes', 'sections' => 'organized,yes,maybe,no')); if (is_numeric($args['user'])) { $args['user'] = $this->_arg_to_int($args['user']); } else { if ('current' == trim($args['user'])) { $user = wp_get_current_user(); $args['user'] = $user->ID; } else { $args['user'] = false; } } if (empty($args['user'])) { return $content; } $args['sections'] = $this->_arg_to_str_list($args['sections']); $args['show_titles'] = $this->_arg_to_bool($args['show_titles']); $output = ''; // Check if the user can organize events $post_type = get_post_type_object(Eab_EventModel::POST_TYPE); if (in_array('organized', $args['sections']) && user_can($args['user'], $post_type->cap->edit_posts)) { $output .= '<div class="' . $args['class'] . ' eab-bp-organized">' . ($args['show_titles'] ? '<h4>' . __('Organized Events', Eab_EventsHub::TEXT_DOMAIN) . '</h4>' : '') . Eab_Template::get_user_organized_events($args['user']) . '</div>'; } if (in_array('yes', $args['sections'])) { $output .= '<div class="' . $args['class'] . ' eab-bp-rsvp_yes">' . ($args['show_titles'] ? '<h4>' . __('Attending Events', Eab_EventsHub::TEXT_DOMAIN) . '</h4>' : '') . Eab_Template::get_user_events(Eab_EventModel::BOOKING_YES, $args['user']) . '</div>'; } if (in_array('maybe', $args['sections'])) { $output .= '<div class="' . $args['class'] . ' eab-bp-rsvp_maybe">' . ($args['show_titles'] ? '<h4>' . __('Maybe attending Events', Eab_EventsHub::TEXT_DOMAIN) . '</h4>' : '') . Eab_Template::get_user_events(Eab_EventModel::BOOKING_MAYBE, $args['user']) . '</div>'; } if (in_array('no', $args['sections'])) { $output .= '<div class="' . $args['class'] . ' eab-bp-rsvp_no">' . ($args['show_titles'] ? '<h4>' . __('Not attending Events', Eab_EventsHub::TEXT_DOMAIN) . '</h4>' : '') . Eab_Template::get_user_events(Eab_EventModel::BOOKING_NO, $args['user']) . '</div>'; } $output = $output ? $output : $content; return $output; }