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