Exemple #1
0
 function wpt_event_ticket_button($atts, $content = null)
 {
     $atts = shortcode_atts(array('id' => false), $atts);
     extract($atts);
     if ($id) {
         $event = new WPT_Event($id);
         $args = array('html' => true);
         return $event->tickets($args);
     }
 }
 /**
  * Gets the HTML for a single event in a listing.
  *
  * @since 	0.11
  * @access 	private
  * @param 	WPT_Event 	$event	The event.
  * @return 	string				The HTML.
  */
 private function get_listing_event_html($event)
 {
     $html = '';
     $args = array('html' => true);
     $html .= '<td>';
     $html .= $event->date($args);
     $html .= $event->time($args);
     $html .= '</td>';
     $html .= '<td>';
     $html .= $event->venue($args);
     $html .= $event->city($args);
     $html .= $event->remark($args);
     $html .= '</td>';
     $html .= '<td>';
     $html .= $event->tickets($args);
     $html .= '</td>';
     /**
      * Filter the HTML for a single event in a listing.
      *
      * @since 	0.11
      * @param 	string 		$html		The current HTML.
      * @param	WPT_Event	$event		The event.
      */
     return apply_filters('wpt/event_editor/listing/event/html', $html, $event);
 }