function eventbrite_group_post($current)
 {
     $post_string = "";
     $post_string .= "<div class='group container innerblock' id='event-" . get_the_ID() . "'>";
     $post_string .= "<div class='group large bright-blue'>";
     // . $current->eventbrite_get_post_style() . "'>";
     $post_string .= "<div class ='group photocontainer'>";
     $post_string .= get_the_post_thumbnail() . "</div>";
     $post_string .= "<div class='group details'>";
     $post_string .= "<div class ='group detailtext'>";
     $post_string .= "<p class = 'group detailtext'>";
     //$post_string .= eventbrite_event_day();
     $post_string .= "<br>" . "</p>";
     $post_string .= eventbrite_event_time() . "</p>";
     $post_string .= "<a href='" . get_the_permalink() . "'> Details</a> - <a href='" . eventbrite_event_venue()->name . "</a> <a href='" . eventbrite_event_eb_url() . "'>" . eventbrite_event_venue()->name . "</a> -<a href='" . eventbrite_event_eb_url() . "'> Sign Up</a></div>";
     $post_string .= " <div class='group title'>";
     $post_string .= "<div class='group titletext'>";
     $post_string .= get_the_title();
     $post_string .= "</div></div></div></div></div>";
     return $post_string;
 }
Exemple #2
0
 /**
  * Output Eventbrite event information such as date, time, venue, and organizer
  */
 function writr_eventbrite_event_meta()
 {
     // Start with the event time.
     $time = sprintf('<li class="event-time"><span class="screen-reader-text">%s</span>%s</li>', esc_html__('Event date and time', 'writr'), eventbrite_event_time());
     // Add a venue name if available.
     $venue = '';
     if (!empty(eventbrite_event_venue()->name)) {
         $venue = sprintf('<li class="event-venue"><span class="screen-reader-text">%s</span><a class="event-venue-link url fn n" href="%s">%s</a></li>', esc_html__('Venue', 'writr'), esc_url(eventbrite_venue_get_archive_link()), esc_html(eventbrite_event_venue()->name));
     }
     // Add the organizer's name if available. Author-related functions are filtered to use the event's organizer.
     $organizer = '';
     if (!empty(eventbrite_event_organizer()->name)) {
         $organizer = sprintf('<li class="event-organizer"><span class="screen-reader-text">%s</span><a class="event-organizer-link url fn n" href="%s">%s</a></li>', esc_html__('Organizer', 'writr'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_html(get_the_author()));
     }
     // Add a contextual link to event details.
     if (eventbrite_is_single()) {
         // Link to event info on eventbrite.com.
         $url = add_query_arg(array('ref' => 'wporglink'), eventbrite_event_eb_url());
     } else {
         // Link to the event single view.
         $url = get_the_permalink();
     }
     $details = sprintf('<li class="event-details"><a class="event-details-link" href="%s">%s</a></li>', esc_url($url), esc_html__('Details', 'writr'));
     // Add an event Edit link.
     $edit = '';
     if (current_user_can('edit_posts')) {
         $url = add_query_arg(array('eid' => get_the_ID(), 'ref' => 'wporgedit'), 'https://eventbrite.com/edit');
         $edit = sprintf('<li class="event-edit"><a href="%s">%s</a></li>', esc_url($url), esc_html__('Edit', 'writr'));
     }
     // Assemble our HTML. Yugly.
     $html = sprintf('<ul class="clear">%1$s%2$s%3$s%4$s%5$s</ul>', $time, $venue, $organizer, $details, $edit);
     echo apply_filters('eventbrite_event_meta', $html, $time, $venue, $organizer, $details, $edit);
 }
Exemple #3
0
 /**
  * Output a permalink to a venue's "archive" page.
  *
  * @return string URL
  */
 function eventbrite_venue_get_archive_link()
 {
     // Get the permalink of the current template page.
     $url = get_permalink(get_queried_object_id());
     // If the event has a venue set, append it to the URL. http://(page permalink)/venue/(venue name)-(venue ID)/
     if (!empty(eventbrite_event_venue()->name)) {
         $url .= 'venue/' . sanitize_title(eventbrite_event_venue()->name) . '-' . absint(eventbrite_event_venue()->id);
     }
     return $url;
 }