default_layout();
break;
} // End of $layout switch
} // End of get_layout()
/**
* Displays the ArtistData XML feed for use on a page
*
* artistdatapress() gets all the plugins options, gets the XML data as an array,
* then outputs an HTML table based on the user-selected options.
*
* @since 0.4
*
* @return mixed $output HTML-formatted table showing upcoming shows from an ArtistData feed
*/
function default_layout() {
$options = get_option( 'slushman_adp_options' );
$showfeed = $this->get_xml();
extract( $options ); ?>
show as $show ) {
// Date
if ( $slushman_adp_date_format == 'default' ) {
$date_format = get_option( 'date_format' );
} else {
$date_format = $slushman_adp_date_format;
} // End of $slushman_adp_date_format check
$showdate = strtotime( $show->date );
$date = date( $date_format, $showdate );
// Time
if ( $slushman_adp_time_format == 'default' ) {
$time_format = get_option( 'time_format' );
} else {
$time_format = $slushman_adp_time_format;
} // End of $slushman_adp_time_format check
$showtime = strtotime( $show->timeSet );
$time = date( $time_format, $showtime );
// ISO
$convert = new DateTime( $show->date . ' ' . $show->timeSet, new DateTimeZone( $show->showtimeZone ) );
$iso = $convert->format( 'Y-m-d\TH:i:sP' );
// Venue
// Make the venue name a link to their site, else display venue name
if ( $show->venueURI && $show->venueURI != '' ) {
$venue = '
' . $show->venueName . '';
} else {
$venue = '
' . $show->venueName . '';
} // End of $show->venueURI empty check
// Location
if ( $show->stateAbbreviation == 'No State' ) {
$loc = '
' . $show->city . ',
' . $show->country . '';
} elseif ( $slushman_adp_country == 'on' ) {
$loc = '
' . $show->city . ',
' . $show->stateAbbreviation . ',
' . $show->countryAbbreviation . '';
} else {
$loc = '
' . $show->city . ',
' . $show->stateAbbreviation . '';
} // End of stateAbbreviation check
// Make the city & state a Google Map link, else just show city & state
if ( $show->venueAddress && $show->venueAddress != '' ) {
// $latitude = ;
// $longitude = ;
$location = '
' . $loc . ' - map
';
} else {
$location = '
' . $loc . '';
} // End of if ( !empty( $show->venueAddress ) )
?>
name; ?>
ticketURI && $show->ticketURI != '' ) { ?>
Tickets: ticketPrice; ?>
Tickets: ticketPrice; ?>ticketURI empty check
} // End of $slushman_adp_display_tickets check
// Display the age limit if selected in the plugin options
if ( $slushman_adp_display_age == 'on') { ?>
Age Limit: ageLimit; ?>