'; $content .= '

' . $artistName . '

'; $content .= ''; echo $content; } /** * * Creates the Artwork for the ArtistPress Single Show template * * @author LTDI Studios * @since 1.0.0 * */ function artistpressShowArtwork(){ $showID = get_the_ID(); $showSettings = get_option('artistpress_show_settings'); $showDisplayArtwork = sanitize_text_field( $showSettings['display_show_artwork'] ); if ( ( $showDisplayArtwork == 'yes' ) && ( has_post_thumbnail($showID) ) ){ $content = '
'; $content .= get_the_post_thumbnail($showID); $content .= '
'; echo $content; } } /** * * Creates the Show Information for the ArtistPress Single Show template * * @author LTDI Studios * @since 1.0.0 * */ function artistpressShowInformation(){ $showID = get_the_ID(); $show_meta_data = get_post_custom($showID); $showDate = esc_html( get_post_meta($showID, 'artistpress_show_date', true) ); $showTime = esc_html( get_post_meta($showID, 'artistpress_show_time', true) ); $showType = esc_html( get_post_meta($showID, 'artistpress_show_type', true) ); $showPrice = esc_html( get_post_meta($showID, 'artistpress_show_price', true) ); $showTicketPhone = esc_html( get_post_meta($showID, 'artistpress_ticket_phone', true) ); $showTicketWeb = esc_html( get_post_meta($showID, 'artistpress_ticket_url', true) ); $showAdditionalInfo = esc_html( get_post_meta($showID, 'artistpress_show_add_info', true) ); $venueID = unserialize($show_meta_data['artistpress_show_venue'][0]); $venueID = $venueID[0]; $venueName = esc_html( get_the_title($venueID) ); $venueStreet = esc_html( get_post_meta($venueID, 'artistpress_venue_address', true)); $venueCity = esc_html( get_post_meta($venueID, 'artistpress_venue_city', true)); $venueState = esc_html( get_post_meta($venueID, 'artistpress_venue_state', true)); $venuePostal = esc_html( get_post_meta($venueID, 'artistpress_venue_postal_code', true)); $venueCountry = esc_html( get_post_meta($venueID, 'artistpress_venue_country', true)); $venueAddress = $venueStreet . '
' . $venueCity . ', ' . $venueState . ' ' . $venuePostal; $venueWebsite = esc_html( get_post_meta($venueID, 'artistpress_venue_website', true)); $venuePhone = esc_html( get_post_meta($venueID, 'artistpress_venue_telephone', true)); $showSettings = get_option('artistpress_show_settings'); $showListSettings = get_option('artistpress_show_list_settings'); $showDisplayDate = sanitize_text_field( $showSettings['display_show_date'] ); $showDisplayTime = sanitize_text_field( $showSettings['display_show_time'] ); $showDisplayType = sanitize_text_field( $showSettings['display_show_type'] ); $showDisplayPrice = sanitize_text_field( $showSettings['display_show_price'] ); $showDisplayTicketPhone = sanitize_text_field( $showSettings['display_ticket_phone'] ); $showDisplayTicketButton = sanitize_text_field( $showSettings['display_ticket_button'] ); $showDisplayInfo = sanitize_text_field( $showSettings['display_additional_info'] ); $showTicketButLabel = sanitize_text_field( $showListSettings['show_ticket_button_label'] ); $showDisplayVenue = sanitize_text_field( $showSettings['display_venue'] ); $showDisplayVenueAddress = sanitize_text_field( $showSettings['display_venue_address'] ); $showDisplayVenuePhone = sanitize_text_field( $showSettings['display_venue_phone'] ); $showDisplayVenueWebBut = sanitize_text_field( $showSettings['display_venue_website_button'] ); /** * Formats the Show Type variable for display. */ if( $showType == 'not-sure' ) { $showType = 'Not Sure'; } elseif( $showType == 'all-ages' ) { $showType = 'All Ages'; } elseif( $showType == 'all-ages-licensed' ) { $showType = 'All Ages Licensed'; } elseif( $showType == 'no-minors' ) { $showType = 'No Minors'; } /** * Formats the URL for the Ticket Web Address. */ if ($showTicketWeb != NULL){ $showTicketWeb = trim($showTicketWeb, '/'); if (!preg_match('#^http(s)?://#', $showTicketWeb)) { $showTicketWeb = 'http://' . $showTicketWeb; } } /** * Formats the URL for the Venue Web Address. */ if ($venueWebsite != NULL){ if (!preg_match('#^http(s)?://#', $venueWebsite)) { $venueWebsite = 'http://' . $venueWebsite ; } } $content = '
'; $content .= '
'; $content .= '
'; $content .= '

Show Details

'; $content .= '
    '; if ( ( $showDisplayDate == 'yes' ) && ( $showDate != NULL) ){ $content .= '
  • Date: ' . $showDate . '
  • '; } if ( ( $showDisplayTime == 'yes' ) && ( $showTime != NULL) ){ $content .= '
  • Time: ' . $showTime . '
  • '; } if ( ( $showDisplayType == 'yes' ) && ( $showType != NULL) ){ $content .= '
  • Show Type: ' . $showType . '
  • '; } if ( ( $showDisplayPrice == 'yes' ) && ( $showPrice != NULL) ){ $content .= '
  • Admission: ' . $showPrice . '
  • '; } if ( ( $showDisplayTicketPhone == 'yes' ) && ( $showTicketPhone != NULL) ){ $content .= '
  • Phone: ' . $showTicketPhone . '
  • '; } $content .= '
'; if ( $showTicketWeb != NULL ){ if ( $showDisplayTicketButton == 'yes' ){ if ( $showTicketButLabel != NULL) { $content .= ''. $showTicketButLabel .''; }else{ $content .= 'Get Tickets'; } } } $content .= '
'; if ($showDisplayVenue == 'yes'){ $content .= '
'; $content .= '

' . $venueName . '

'; $content .= '
    '; if (( $showDisplayVenueAddress == 'yes' ) && ( $venueAddress != NULL ) ){ $content .= '
  • ' . $venueAddress . '
  • '; } if (( $showDisplayVenuePhone == 'yes' ) && ( $venuePhone != NULL ) ){ $content .= '
  • Venue Phone: ' . $venuePhone . '
  • '; } $content .= '
'; if (( $showDisplayVenueWebBut == 'yes' ) && ($venueWebsite != NULL) ){ $content .= 'Venue Website'; } $content .= '
'; } $content .= '
'; if ($showDisplayInfo == 'yes'){ $content .= '
'; $content .= '
'; if ($showAdditionalInfo != NULL){ $content .= '

Additional Info:

'; $content .= '' . $showAdditionalInfo . ''; } $content .= '
'; $content .= '
'; } $content .= '
'; echo $content; } /** * * Creates the Map for the ArtistPress Single Show template * * @author LTDI Studios * @since 1.0.0 * */ function artistpressShowMap(){ $showSettings = get_option('artistpress_show_settings'); $showDisplayMap = sanitize_text_field($showSettings['map_display'] ); $showDisplayDirections = sanitize_text_field($showSettings['map_directions'] ); $showID = get_the_ID(); $show_meta_data = get_post_custom($showID); $venueID = unserialize($show_meta_data['artistpress_show_venue'][0]); $venueID = $venueID[0]; $artistpress_venue_latlng = esc_html( get_post_meta($venueID, 'artistpress_venue_latlng', true)); $artistpress_venue_latlng = substr($artistpress_venue_latlng, 1, -1); $startLatLng = null; $endLatLng = $artistpress_venue_latlng; if ( $showDisplayMap == 'yes' ){ $content = '
'; $content .= '
'; $content .= ''; $content .= '
'; $content .= '
'; if ( $showDisplayDirections == 'no' ){ $content .= '