'', ), $atts)); if (!$id){ $shortcodeContent = "

You need to provide an ID to the artist shortcode to display an artist.

"; }else{ $artistID = esc_html($id); $artistName = get_the_title($artistID); $artistPhone = esc_html( get_post_meta($artistID, 'artistpress_artist_phone_number', true) ); $artistEmail = sanitize_email( get_post_meta($artistID, 'artistpress_artist_email_address', true) ); $artistWebsite = esc_url( get_post_meta($artistID, 'artistpress_artist_web_address', true) ); $artistBio = esc_html( get_post_meta($artistID, 'artistpress_artist_bio', true) ); $artistOptions = get_option('artistpress_artist_settings'); $artistOptionName = sanitize_text_field($artistOptions['artist_name']); $artistOptionPhone = sanitize_text_field($artistOptions['artist_phone']); $artistOptionPhoneLink = sanitize_text_field($artistOptions['artist_phone_link']); $artistOptionEmail = sanitize_text_field($artistOptions['artist_email']); $artistOptionWeb = sanitize_text_field($artistOptions['artist_web']); $artistOptionBio = sanitize_text_field($artistOptions['artist_bio']); $artistOptionStyles = sanitize_text_field($artistOptions['artist_use_artist_stylesheet']); $shortcodeContent = NULL; if( $artistOptionStyles == 'yes'){ wp_enqueue_style( 'artist-styles' ); } $shortcodeContent .= '
'; $shortcodeContent .= '
'; if ($artistOptionName == 'yes'){ $shortcodeContent .= '

' . $artistName . '

'; } $shortcodeContent .= '
'; $shortcodeContent .='
'; $shortcodeContent .='
'; $shortcodeContent .= get_the_post_thumbnail($artistID); $shortcodeContent .='
'; $shortcodeContent .='
'; $shortcodeContent .='
'; $shortcodeContent .='
'; $shortcodeContent .='
    '; if ($artistOptionPhone == 'yes'){ if ($artistOptionPhoneLink == 'yes'){ $shortcodeContent .='
  • Phone: ' . $artistPhone . '
  • '; }else{ $shortcodeContent .='
  • Phone: ' . $artistPhone . '
  • '; } } if ($artistOptionEmail == 'yes'){ $shortcodeContent .='
  • Email: ' . $artistEmail . '
  • '; } if ($artistOptionWeb == 'yes'){ $shortcodeContent .='
  • Website: ' . $artistWebsite . '
  • '; } $shortcodeContent .='
'; $shortcodeContent .='
'; $shortcodeContent .='
'; if ($artistOptionBio == 'yes'){ $shortcodeContent .='

Biography:

' . $artistBio . '
'; } $shortcodeContent .='
'; } return $shortcodeContent; }