tec_events_get_time_range_separator()
Gets the separator used between the start and end time of an event.
Return
(string) Time Range separator.
Source
File: src/functions/template-tags/date.php
function tec_events_get_time_range_separator(): string {
$cache = tribe_cache();
$is_cache_set = isset( $cache['tec_events_get_time_range_separator'] );
$time_range_separator = $cache['tec_events_get_time_range_separator'];
if ( $is_cache_set && is_string( $time_range_separator ) ) {
return $time_range_separator;
}
$default = ' - ';
$time_range_separator = tribe_get_option( 'timeRangeSeparator', $default );
/**
* Opportunity to modify the separator used between the start and end time of an event.
*
* @since 6.7.0
*
* @param string $time_range_separator
* @param string $default
*/
$time_range_separator = apply_filters(
'tec_events_get_time_range_separator',
$time_range_separator,
$default
);
$time_range_separator = wp_kses_post( $time_range_separator );
$cache['tec_events_get_time_range_separator'] = $time_range_separator;
return $time_range_separator;
}
Changelog
| Version | Description |
|---|---|
| 6.7.0 | Introduced. |