示例#1
0
/**
 * Retrieve gig information in markup suitable for a RSS description.
 *
 * @since 1.0.0
 * @uses get_audiotheme_venue_vcard_rss()
 *
 * @param int|object $post Optional post ID or object. Default is global $post object.
 * @return string
 */
function get_audiotheme_gig_rss_description($post = null)
{
    $gig = get_audiotheme_gig($post);
    $output = '<strong>' . get_audiotheme_gig_time('l, F j, Y', ' @ g:i a') . '</strong>';
    $output .= empty($gig->venue) ? '' : get_audiotheme_venue_vcard($gig->venue->ID, array('container' => 'div'));
    $output .= empty($gig->post_excerpt) ? '' : wpautop($gig->post_excerpt);
    return $output;
}
示例#2
0
/**
 * Display or retrieve the current venue in vCard markup.
 *
 * @since 1.0.0
 *
 * @param array $args Optional. Passed to get_audiotheme_venue_vcard()
 * @param bool $echo Optional. Default to true. Whether to display or return.
 * @return string|null Null on failure or display. String when echo is false.
 */
function the_audiotheme_venue_vcard($args = array(), $echo = true)
{
    $gig = get_audiotheme_gig();
    if (empty($gig->venue)) {
        return;
    }
    $html = get_audiotheme_venue_vcard($gig->venue->ID, $args);
    if ($echo) {
        echo $html;
    } else {
        return $html;
    }
}