Last active
May 21, 2018 09:37
-
-
Save jentheo/dc51a22f2772e63616d5c0bf469b07f9 to your computer and use it in GitHub Desktop.
URL additional field label
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Single Event Meta (Additional Fields) Template | |
* | |
* Override this template in your own theme by creating a file at: | |
* [your-theme]/tribe-events/pro/modules/meta/additional-fields.php | |
* | |
* @package TribeEventsCalendarPro | |
*/ | |
if ( ! isset( $fields ) || empty( $fields ) || ! is_array( $fields ) ) { | |
return; | |
} | |
?> | |
<div class="tribe-events-meta-group tribe-events-meta-group-other"> | |
<h3 class="tribe-events-single-section-title"> <?php esc_html_e( 'Other', 'tribe-events-calendar-pro' ) ?> </h3> | |
<dl> | |
<?php foreach ( $fields as $name => $value ): | |
if ( $name == 'your url field' ): | |
$url = strip_tags( $value ); ?> | |
<dt> <?php echo '<a href="' . strip_tags( $value ) . '">Buy tickets</a><dd class="tribe-meta-value"></dd>'; ?> </dt> | |
<?php else: ?> | |
<dt> <?php echo esc_html( $name ); ?> </dt> | |
<dd class="tribe-meta-value"> | |
<?php | |
// This can hold HTML. The values are cleansed upstream | |
echo $value; | |
?> | |
</dd> | |
<?php endif; ?> | |
<?php endforeach ?> | |
</dl> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment