post_type == 'tsml_meeting') { $title = __('Enter meeting name', '12-step-meeting-list'); } return $title; }); // move author meta box to right side add_action('do_meta_boxes', function () { remove_meta_box('authordiv', 'tsml_meeting', 'normal'); add_meta_box('authordiv', __('Editor', '12-step-meeting-list'), 'post_author_meta_box', 'tsml_meeting', 'side', 'default'); }); // add admin assets to tsml screens only add_action('admin_enqueue_scripts', function () { $screen = get_current_screen(); if (is_object($screen) && $screen->post_type === 'tsml_meeting') { tsml_assets(); } }); // edit page add_action('admin_init', function () { // compares versions and updates databases as needed for upgrades $tsml_version = get_option('tsml_version'); if (version_compare($tsml_version, TSML_VERSION, '<')) { // do this every time update_option('tsml_version', TSML_VERSION); flush_rewrite_rules(); }; add_meta_box('info', __('Meeting Information', '12-step-meeting-list'), function () { global $tsml_days, $tsml_programs, $tsml_program, $tsml_nonce, $tsml_types_in_use; $meeting = tsml_get_meeting(); $languages = tsml_languages(); $types = array_diff_key($tsml_programs[$tsml_program]['types'], array_merge($languages, array_fill_keys(['ONL', 'TC'], true))); $user_language = strtoupper(substr(get_user_locale(), 0, 2)); // time is before the end of april and not currently using temporary closure if (!in_array('TC', $tsml_types_in_use) && time() < strtotime('2020-04-30')) { tsml_alert('Please note: a new “Temporary Closure” meeting type has recently been added. Use this to indicate meetings that are temporarily not meeting. Find it under “View all” below.', 'warning'); } if (!empty($meeting->data_source)) { $data_source_name = property_exists($meeting, 'data_source_name') ? $meeting->data_source_name : $meeting->data_source; $message = sprintf( // translators: %s is the data source name __('This meeting was imported from an external feed %s. Any changes you make here will be overwritten when you refresh the data.', '12-step-meeting-list'), "$data_source_name" ); tsml_alert($message, 'warning'); } // nonce field wp_nonce_field($tsml_nonce, 'tsml_nonce', false); ?>
time, ['class' => 'time', 'data-time-format' => get_option('time_format'), 'disabled' => !strlen(@$meeting->day)]); tsml_input_text('end_time', @$meeting->end_time, ['class' => 'time', 'data-time-format' => get_option('time_format'), 'disabled' => !strlen(@$meeting->day)]); ?>
$type) { ?>
$type) { ?>

+12125551212,,123456789#,,#,,444444#', '12-step-meeting-list'), implode(', ', tsml_conference_providers()) ), TSML_ALLOWED_HTML ) ?>

conference_url) ?>
conference_url_notes) ?>
conference_phone, ['placeholder' => "+12125551212,,123456789#,,#,,444444#"]) ?>
conference_phone_notes) ?>
post_parent) { $location = tsml_get_location($meeting->post_parent); $meetings = tsml_get_meetings(['location_id' => $location->ID]); } ?>



post_title) ?>
formatted_address, ['data-original-value' => @$location->formatted_address]); tsml_input_hidden('approximate', @$location->approximate); tsml_input_hidden('latitude', @$location->latitude); tsml_input_hidden('longitude', @$location->longitude); ?>



1) { ?>
'region', 'taxonomy' => 'tsml_region', 'hierarchical' => true, 'hide_empty' => false, 'orderby' => 'name', 'selected' => empty($location->region_id) ? null : $location->region_id, 'show_option_none' => __('Region', '12-step-meeting-list'), ]) ?>
timezone) { $timezone = $location->timezone; } elseif ($post && 'auto-draft' === $post->post_status) { $timezone = $tsml_timezone; } tsml_timezone_select($timezone); ?>
timezone) && empty($tsml_timezone) && $tsml_user_interface === 'tsml_ui') { ?>

1) { ?>
ID) ?>
Optional', '12-step-meeting-list'), function () { global $tsml_contact_display; $meeting = tsml_get_meeting(); $meetings = []; $district = 0; if (!empty($meeting->group_id)) { $meetings = tsml_get_meetings(['group_id' => $meeting->group_id]); $district = wp_get_post_terms($meeting->group_id, 'tsml_district', ['fields' => 'ids']); if (is_array($district)) { $district = empty($district) ? 0 : $district[0]; } } ?>
group) ?>
1) { ?>
ID) ?>
'district', 'taxonomy' => 'tsml_district', 'hierarchical' => true, 'hide_empty' => false, 'orderby' => 'name', 'selected' => $district, 'show_option_none' => __('None', '12-step-meeting-list'), ]) ?>
website) ?>
website_2) ?>
email, ['placeholder' => 'group@website.org']) ?>
phone, ['placeholder' => '+18005551212']) ?>
mailing_address, ['placeholder' => '123 Main St, Anytown OK']) ?>
venmo, ['placeholder' => '@VenmoHandle']) ?>
square, ['placeholder' => '$Cashtag']) ?>
paypal, ['placeholder' => 'PayPalUsername']) ?>
homegroup_online, ['placeholder' => 'Homegroup Online group code']) ?>
__('Name', '12-step-meeting-list'), 'email' => __('Email', '12-step-meeting-list'), 'phone' => __('Phone', '12-step-meeting-list')] as $key => $label) { $field = implode('_', ['contact', $i, $key]); ?>
{$field}, ['placeholder' => $label]) ?>
last_contact) ?>