Hi,
Client wants the Google Calendar to open in a new tab, on a single event page like http://841.ab2.mwp.accessdomain.com/event/lafayette-boot-camp/ .
I thought to rework and apply the code in venue.php, to ical.php, but no dice:
function tribe_get_gcal_link( $post_id = null, $label = null ) {
$url = tribe_get_gcal_link_url( $post_id );
if ( ! empty( $url ) ) {
$label = is_null( $label ) ? $url : $label;
if ( ! empty( $url ) ) {
$parseUrl = parse_url( $url );
if ( empty( $parseUrl['scheme'] ) ) {
$url = "http://$url";
}
}
$html = sprintf(
'<a href="%s" target="%s">%s</a>',
esc_attr( esc_url( $url ) ),
apply_filters( 'tribe_get_gcal_link_target', '_blank' ),
apply_filters( 'tribe_get_gcal_link_label', esc_html( $label ) )
);
} else {
$html = '';
}
return apply_filters( 'tribe_get_gcal_link', $html );
}
Which returns this error: Fatal error: Call to undefined function tribe_get_gcal_link_url() in /home/content/p3pnexwpnas15_data02/33/3250433/html/wp-content/plugins/the-events-calendar/src/functions/template-tags/ical.php on line 4
So we have to define a function, but this is where I go off the rails. Any ideas to help get this back on track?
Thanks in advance,