Wordpress PHP插件代码

时间:2016-08-28 01:03:14

标签: php wordpress

您好我需要帮助修改下面的PHP。基本上我需要在$ time&之间的输出中插入一个分隔符。 $ Venue并将场地变成带有固定URL的超链接。

if ( ! function_exists( 'TCG_eventbrite_event_meta' ) ) :
function TCG_eventbrite_event_meta() {
    // Determine our separator.
    $separator = apply_filters( 'eventbrite_meta_separator', '<span class="sep"> &middot; </span>' );
    // Start our HTML output with the event time.
    $time = '<span class="event-time">' . eventbrite_event_time() . '</span>';
    // Add a venue name if available.
    $venue = '<span class="event-venue">' . eventbrite_event_venue()->name . '</span>';
    // Assemble our HTML. Yugly.
    $html = sprintf( _x( '%1$s%2$s', '%1$s: time, %2$s: venue', 'eventbrite-api' ),
        $time,
        $venue
    );
    echo apply_filters( 'eventbrite_event_meta', $html, $time, $venue );
}
endif;

1 个答案:

答案 0 :(得分:0)

最快的灵魂就是:

$venue = ' | <span class="event-venue"><a href="http//staticlink.com" target="_blank">' . eventbrite_event_venue()->name . '</a></span>';