__('Directions', '12-step-meeting-list'),
'directions_url' => in_array('TC', $meeting->types) ? null : $meeting->directions,
'formatted_address' => $meeting->formatted_address,
'approximate' => $meeting->approximate,
'latitude' => $meeting->latitude,
'location' => get_the_title($meeting->post_parent),
'location_id' => $meeting->post_parent,
'location_url' => get_permalink($meeting->post_parent),
'longitude' => $meeting->longitude,
]);
// adding custom body classes
add_filter('body_class', function ($classes) {
global $meeting;
$classes[] = 'tsml tsml-detail tsml-meeting';
if ($type_classes = tsml_to_css_classes($meeting->types, 'tsml-type-')) {
$classes[] = $type_classes;
}
// add the attendance option class to the body tag
$classes[] = 'attendance-' . sanitize_title($meeting->attendance_option);
$classes[] = ($meeting->approximate === 'yes') ? 'address-approximate' : 'address-specific';
return $classes;
});
tsml_header();
?>
types) && ($meeting->approximate !== 'yes')) { ?>
-
day, $meeting->time));
if (!empty($meeting->end_time)) {
// translators: until
echo esc_html(__(' to ', '12-step-meeting-list') . tsml_format_time($meeting->end_time));
}
?>
attendance_option === 'hybrid' ? ['in_person', 'online'] : [$meeting->attendance_option] as $option) { ?>
-
-
types_expanded as $type) { ?>
-
type_description)) { ?>
type_description) ?>
notes)) { ?>
conference_url) || !empty($meeting->conference_phone)) { ?>
-
conference_url) && $provider = tsml_conference_provider($meeting->conference_url)) {
tsml_icon_button($meeting->conference_url, $provider === true ? $meeting->conference_url :
// translators: %s is the name of the conference provider
sprintf(__('Join with %s', '12-step-meeting-list'), $provider), 'video');
?>
conference_url_notes) { ?>
conference_url_notes) ?>
conference_phone)) {
tsml_icon_button('tel:' . $meeting->conference_phone, __('Join by Phone', '12-step-meeting-list'), 'phone');
if ($meeting->conference_phone_notes) { ?>
conference_phone_notes) ?>
[
'name' => 'Venmo',
'url' => 'https://venmo.com/',
'substr' => 1,
],
'square' => [
'name' => 'Cash App',
'url' => 'https://cash.app/',
'substr' => 0,
],
'paypal' => [
'name' => 'PayPal',
'url' => 'https://www.paypal.me/',
'substr' => 0,
],
'homegroup_online' => [
'name' => 'Homegroup Online',
'url' => 'https://donate.homegroup.online/',
'substr' => 0,
],
];
$active_services = array_filter(array_keys($services), function ($service) use ($meeting) {
return !empty($meeting->{$service});
});
if (count($active_services)) { ?>
-
{$field})) {
tsml_icon_button($service['url'] . substr($meeting->{$field}, $service['substr']), sprintf(
// translators: %s is the name of the contribution service
__('Contribute with %s', '12-step-meeting-list'),
$service['name']
), 'cash');
}
}
?>
location_id)) { ?>
location) ?>
location_meetings) - 1) { ?>
formatted_address), TSML_ALLOWED_HTML) ?>
location_notes)) { ?>
region) && !strpos($meeting->formatted_address, $meeting->region)) { ?>
region) ?>
contact_1_name) || !empty($meeting->contact_1_email) || !empty($meeting->contact_1_phone) ||
!empty($meeting->contact_2_name) || !empty($meeting->contact_2_email) || !empty($meeting->contact_2_phone) ||
!empty($meeting->contact_3_name) || !empty($meeting->contact_3_email) || !empty($meeting->contact_3_phone)));
if (!empty($meeting->group) || !empty($meeting->website) || !empty($meeting->website_2) || !empty($meeting->email) || !empty($meeting->phone) || $hasContactInformation) { ?>
-
group) ? __('Contact Information', '12-step-meeting-list') : $meeting->group) ?>
group_notes)) { ?>
district)) { ?>
website)) {
tsml_icon_button($meeting->website, tsml_format_domain($meeting->website), 'link');
}
if (!empty($meeting->website_2)) {
tsml_icon_button($meeting->website_2, tsml_format_domain($meeting->website_2), 'link');
}
if (!empty($meeting->email)) {
tsml_icon_button('mailto:' . $meeting->email, $meeting->email, 'email');
}
if (!empty($meeting->phone)) {
tsml_icon_button('tel:' . $meeting->phone, $meeting->phone, 'phone');
}
if ($hasContactInformation) {
for ($i = 1; $i <= TSML_GROUP_CONTACT_COUNT; $i++) {
$name = empty($meeting->{'contact_' . $i . '_name'}) ? sprintf(
// translators: %s is the contact's ordinal number
__('Contact %s', '12-step-meeting-list'),
$i
) : $meeting->{'contact_' . $i . '_name'};
if (!empty($meeting->{'contact_' . $i . '_email'})) {
tsml_icon_button('mailto:' . $meeting->{'contact_' . $i . '_email'}, sprintf(
// translators: %s is the contact's name
__('%s’s Email', '12-step-meeting-list'),
$name
), 'email');
}
if (!empty($meeting->{'contact_' . $i . '_phone'})) {
tsml_icon_button('sms:' . $meeting->{'contact_' . $i . '_phone'}, sprintf(
// translators: %s is the contact's name
__('%s’s Phone', '12-step-meeting-list'),
$name
), 'phone');
}
}
}
?>
-
data_source)) {
if (!empty($meeting->entity) || !empty($meeting->entity_url)) { ?>
entity)) { ?>
entity) ?>
entity_location)) { ?>
entity_location) ?>
entity_phone)) {
tsml_icon_button('tel:' . $meeting->entity_phone, $meeting->entity_phone, 'phone');
}
if (!empty($meeting->entity_url)) {
tsml_icon_button($meeting->entity_url, preg_replace('%^https?\:\/+%', '', $meeting->entity_url), 'link');
}
}
}
?>
feedback_emails)) { ?>