From 42d473bc62f42254cd4109fdb6e8e8af9bf976ba Mon Sep 17 00:00:00 2001 From: Josh Reisner <1551689+joshreisner@users.noreply.github.com> Date: Sun, 2 Aug 2020 06:57:46 -0700 Subject: [PATCH 01/11] bugfix: allow users to customize meetings url --- includes/functions.php | 12 ++++++++---- includes/variables.php | 9 +++++++-- readme.txt | 2 ++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 6406c3d4..df371984 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -224,6 +224,9 @@ function tsml_custom_flags($flags) { //used: init.php on every request, also in change_activation_state() for plugin activation or deactivation function tsml_custom_post_types() { global $tsml_slug; + + $is_public = !empty($tsml_slug); + register_taxonomy('tsml_region', 'tsml_location', array( 'labels' => array( 'name' => __('Regions', '12-step-meeting-list'), @@ -278,8 +281,9 @@ function tsml_custom_post_types() { //not sure if we want this on the meeting or on the location //'supports' => array('title', 'thumbnail'), 'supports' => array('title', 'author'), - 'public' => true, - 'has_archive' => true, + 'public' => $is_public, + 'show_ui' => true, + 'has_archive' => $is_public, 'menu_icon' => 'dashicons-groups', 'rewrite' => array('slug'=>$tsml_slug), ) @@ -288,9 +292,9 @@ function tsml_custom_post_types() { register_post_type('tsml_location', array( 'supports' => array('title'), - 'public' => true, + 'public' => $is_public, 'show_ui' => false, - 'has_archive' => true, + 'has_archive' => $is_public, 'capabilities' => array('create_posts' => false), 'rewrite' => array('slug'=>'locations'), 'taxonomies' => array('tsml_region'), diff --git a/includes/variables.php b/includes/variables.php index c9d941e6..f54875df 100644 --- a/includes/variables.php +++ b/includes/variables.php @@ -458,7 +458,10 @@ $tsml_timestamp = microtime(true); //these are empty now because polylang might change the language. gets set in the plugins_loaded hook -$tsml_days = $tsml_days_order = $tsml_programs = $tsml_types_in_use = $tsml_slug = null; $tsml_strings = null; +$tsml_days = $tsml_days_order = $tsml_programs = $tsml_types_in_use = $tsml_strings = null; + +//string url for the meeting finder, or false for no automatic archive page +if (!isset($tsml_slug)) $tsml_slug = null; add_action('plugins_loaded', 'tsml_define_strings'); @@ -1136,7 +1139,9 @@ function tsml_define_strings() { ); //the location where the list will show up, eg https://intergroup.org/meetings - $tsml_slug = sanitize_title(__('meetings', '12-step-meeting-list')); + if ($tsml_slug === null) { + $tsml_slug = sanitize_title(__('meetings', '12-step-meeting-list')); + } //strings that must be synced between the javascript and the PHP $tsml_strings = array( diff --git a/readme.txt b/readme.txt index a08bc28c..1016d1bc 100644 --- a/readme.txt +++ b/readme.txt @@ -191,6 +191,8 @@ Yes, try setting the $tsml_slug variable in your functions.php. $tsml_slug = 'schedule'; +You may set it to false to hide the public meeting finder altogether. + To apply these changes, you must go to Settings > Permalinks and click "Save Changes" == Screenshots == From 71efec1618801a545734bc02309ba78150d06d4c Mon Sep 17 00:00:00 2001 From: Josh Reisner <1551689+joshreisner@users.noreply.github.com> Date: Sun, 9 Aug 2020 04:10:56 -0700 Subject: [PATCH 02/11] fixing classname for anchor link (#142) --- templates/single-meetings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/single-meetings.php b/templates/single-meetings.php index 664a9d89..e62ea7e1 100644 --- a/templates/single-meetings.php +++ b/templates/single-meetings.php @@ -147,7 +147,7 @@ function tsml_body_class($classes) { foreach ($active_services as $field) { $service = $services[$field]; if (!empty($meeting->{$field})) {?> - + From a903e5f6651c8e209a538408a6d98a9ebcf7ef99 Mon Sep 17 00:00:00 2001 From: Josh Reisner <1551689+joshreisner@users.noreply.github.com> Date: Sun, 9 Aug 2020 18:34:28 -0700 Subject: [PATCH 03/11] hiding link to meeting finder when $tsml_slug is null --- includes/admin_import.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/admin_import.php b/includes/admin_import.php index 6069dc93..fe8821b1 100644 --- a/includes/admin_import.php +++ b/includes/admin_import.php @@ -4,7 +4,7 @@ function tmsl_import_page() { global $wpdb, $tsml_data_sources, $tsml_programs, $tsml_program, $tsml_nonce, $tsml_days, $tsml_feedback_addresses, $tsml_notification_addresses, $tsml_distance_units, $tsml_sharing, $tsml_sharing_keys, $tsml_contact_display, - $tsml_google_maps_key, $tsml_mapbox_key; + $tsml_google_maps_key, $tsml_mapbox_key, $tsml_slug; $error = false; @@ -652,9 +652,11 @@ function tmsl_import_page() { $groups = tsml_count_groups(); ?>

+

right here. Link that page from your site\'s nav menu to make it visible to the public.', '12-step-meeting-list'), get_post_type_archive_link('tsml_meeting'))?>

- -

CSV format.', '12-step-meeting-list'), admin_url('admin-ajax.php') . '?action=csv')?>

+ +

CSV format.', '12-step-meeting-list'), admin_url('admin-ajax.php') . '?action=csv')?>

4×7, half page and full page.', '12-step-meeting-list'), admin_url('admin-ajax.php') . '?action=tsml_pdf&width=4&height=7', admin_url('admin-ajax.php') . '?action=tsml_pdf', admin_url('admin-ajax.php') . '?action=tsml_pdf&width=8.5')?>

class="hidden"> From bb4ff6aad6eff39589b423bb0cb31714b01f328d Mon Sep 17 00:00:00 2001 From: Josh Reisner <1551689+joshreisner@users.noreply.github.com> Date: Sun, 16 Aug 2020 12:47:41 -0700 Subject: [PATCH 04/11] adding react configuration options --- includes/shortcodes.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/shortcodes.php b/includes/shortcodes.php index 24f1a1a9..8c2766f8 100644 --- a/includes/shortcodes.php +++ b/includes/shortcodes.php @@ -85,12 +85,15 @@ function tsml_types_list() //output a react meeting finder widget https://github.com/code4recovery/react if (!function_exists('tsml_react')) { function tsml_react() { - global $tsml_mapbox_key, $tsml_nonce, $tsml_sharing; + global $tsml_mapbox_key, $tsml_nonce, $tsml_sharing, $tsml_conference_providers; $host = 'https://react.' . (tsml_string_ends(get_site_url(), '.test') ? 'test' : 'meetingguide.org'); $url = admin_url('admin-ajax.php') . '?action=meetings&nonce=' . wp_create_nonce($tsml_nonce); wp_enqueue_style('tsml_react', $host . '/style.css'); wp_enqueue_script('tsml_react', $host . '/app.js'); - wp_add_inline_script('tsml_react', 'window.config={timezone: "' . get_option('timezone_string') . '"}', 'before'); + wp_localize_script('tsml_react', 'tsml_react_config', array( + 'timezone' => get_option('timezone_string'), + 'conference_providers' => $tsml_conference_providers + )); return ''; } } From 5d9db7a4693d70f0851e643cc39af771e1608892 Mon Sep 17 00:00:00 2001 From: Josh Reisner <1551689+joshreisner@users.noreply.github.com> Date: Tue, 18 Aug 2020 19:13:27 -0700 Subject: [PATCH 05/11] adding support for conference_url_notes and conference_phone_notes --- includes/admin_meeting.php | 10 ++++- includes/ajax.php | 82 ++++++++++++++++++----------------- includes/functions.php | 8 +++- includes/save.php | 22 +++++++++- templates/single-meetings.php | 8 +++- 5 files changed, 86 insertions(+), 44 deletions(-) diff --git a/includes/admin_meeting.php b/includes/admin_meeting.php index 05a07c8a..4185f387 100644 --- a/includes/admin_meeting.php +++ b/includes/admin_meeting.php @@ -100,9 +100,17 @@ function tsml_meeting_box() {
- + + +
+
+
+
+ + +
'Time', - 'end_time' => 'End Time', - 'day' => 'Day', - 'name' => 'Name', - 'location' => 'Location', - 'formatted_address' => 'Address', - 'region' => 'Region', - 'sub_region' => 'Sub Region', - 'types' => 'Types', - 'notes' => 'Notes', - 'location_notes' => 'Location Notes', - 'group' => 'Group', - 'district' => 'District', - 'sub_district' => 'Sub District', - 'website' => 'Website', - 'website_2' => 'Website 2', - 'mailing_address' => 'Mailing Address', - 'venmo' => 'Venmo', - 'square' => 'Square', - 'paypal' => 'Paypal', - 'email' => 'Email', - 'phone' => 'Phone', - 'group_notes' => 'Group Notes', - 'contact_1_name' => 'Contact 1 Name', - 'contact_1_email' => 'Contact 1 Email', - 'contact_1_phone' => 'Contact 1 Phone', - 'contact_2_name' => 'Contact 2 Name', - 'contact_2_email' => 'Contact 2 Email', - 'contact_2_phone' => 'Contact 2 Phone', - 'contact_3_name' => 'Contact 3 Name', - 'contact_3_email' => 'Contact 3 Email', - 'contact_3_phone' => 'Contact 3 Phone', - 'last_contact' => 'Last Contact', - 'conference_url' => 'Conference URL', - 'conference_phone' => 'Conference Phone', - 'author' => 'Author', - 'slug' => 'Slug', - 'updated' => 'Updated', + 'time' => 'Time', + 'end_time' => 'End Time', + 'day' => 'Day', + 'name' => 'Name', + 'location' => 'Location', + 'formatted_address' => 'Address', + 'region' => 'Region', + 'sub_region' => 'Sub Region', + 'types' => 'Types', + 'notes' => 'Notes', + 'location_notes' => 'Location Notes', + 'group' => 'Group', + 'district' => 'District', + 'sub_district' => 'Sub District', + 'website' => 'Website', + 'website_2' => 'Website 2', + 'mailing_address' => 'Mailing Address', + 'venmo' => 'Venmo', + 'square' => 'Square', + 'paypal' => 'Paypal', + 'email' => 'Email', + 'phone' => 'Phone', + 'group_notes' => 'Group Notes', + 'contact_1_name' => 'Contact 1 Name', + 'contact_1_email' => 'Contact 1 Email', + 'contact_1_phone' => 'Contact 1 Phone', + 'contact_2_name' => 'Contact 2 Name', + 'contact_2_email' => 'Contact 2 Email', + 'contact_2_phone' => 'Contact 2 Phone', + 'contact_3_name' => 'Contact 3 Name', + 'contact_3_email' => 'Contact 3 Email', + 'contact_3_phone' => 'Contact 3 Phone', + 'last_contact' => 'Last Contact', + 'conference_url' => 'Conference URL', + 'conference_url_notes' => 'Conference URL Notes', + 'conference_phone' => 'Conference Phone', + 'conference_phone_notes' => 'Conference Phone Notes', + 'author' => 'Author', + 'slug' => 'Slug', + 'updated' => 'Updated', ); //helper vars @@ -480,7 +482,7 @@ function tsml_ajax_import() { } //add custom meeting fields if available - foreach (array('types', 'data_source', 'conference_url', 'conference_phone') as $key) { + foreach (array('types', 'data_source', 'conference_url', 'conference_url_notes', 'conference_phone', 'conference_phone_notes') as $key) { if (!empty($meeting[$key])) add_post_meta($meeting_id, $key, $meeting[$key]); } @@ -671,7 +673,7 @@ function tsml_ajax_meeting_link() { $meeting_id = intval( $_GET['meeting_id'] ); $url = get_post_meta( $meeting_id, 'conference_url', true ); if ( $url ) { - wp_send_json_success( [ 'meeting' => $url ] ); + wp_send_json_success(array('meeting' => $url)); } else { wp_send_json_error(); } diff --git a/includes/functions.php b/includes/functions.php index df371984..5e8cee93 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -997,7 +997,9 @@ function tsml_get_meetings($arguments=array(), $from_cache=true) { 'end_time' => @$meeting_meta[$post->ID]['end_time'], 'time_formatted' => tsml_format_time(@$meeting_meta[$post->ID]['time']), 'conference_url' => @$meeting_meta[$post->ID]['conference_url'], + 'conference_url_notes' => @$meeting_meta[$post->ID]['conference_url_notes'], 'conference_phone' => @$meeting_meta[$post->ID]['conference_phone'], + 'conference_phone_notes' => @$meeting_meta[$post->ID]['conference_phone_notes'], 'types' => empty($meeting_meta[$post->ID]['types']) ? array() : array_values(unserialize($meeting_meta[$post->ID]['types'])), ), $locations[$post->post_parent]); @@ -1038,7 +1040,7 @@ function tsml_get_meta($type, $id=null) { $keys = array( 'tsml_group' => '"website", "website_2", "email", "phone", "mailing_address", "venmo", "square", "paypal", "last_contact"' . (current_user_can('edit_posts') ? ', "contact_1_name", "contact_1_email", "contact_1_phone", "contact_2_name", "contact_2_email", "contact_2_phone", "contact_3_name", "contact_3_email", "contact_3_phone"' : ''), 'tsml_location' => '"formatted_address", "latitude", "longitude"', - 'tsml_meeting' => '"day", "time", "end_time", "types", "group_id", "website", "website_2", "email", "phone", "mailing_address", "venmo", "square", "paypal", "last_contact", "conference_url", "conference_phone"' . (current_user_can('edit_posts') ? ', "contact_1_name", "contact_1_email", "contact_1_phone", "contact_2_name", "contact_2_email", "contact_2_phone", "contact_3_name", "contact_3_email", "contact_3_phone"' : ''), + 'tsml_meeting' => '"day", "time", "end_time", "types", "group_id", "website", "website_2", "email", "phone", "mailing_address", "venmo", "square", "paypal", "last_contact", "conference_url", "conference_url_notes", "conference_phone", "conference_phone_notes"' . (current_user_can('edit_posts') ? ', "contact_1_name", "contact_1_email", "contact_1_phone", "contact_2_name", "contact_2_email", "contact_2_phone", "contact_3_name", "contact_3_email", "contact_3_phone"' : ''), ); if (!array_key_exists($type, $keys)) return trigger_error('tsml_get_meta for unexpected type ' . $type); $meta = array(); @@ -1289,11 +1291,15 @@ function tsml_import_buffer_set($meetings, $data_source=null) { $meetings[$i]['types'][] = 'ONL'; } else { $meetings[$i]['conference_url'] = null; + $meetings[$i]['conference_url_notes'] = null; } } if (!empty($meetings[$i]['conference_phone']) && empty($meetings[$i]['conference_url'])) { $meetings[$i]['types'][] = 'ONL'; } + if (empty($meetings[$i]['conference_phone'])) { + $meetings[$i]['conference_phone_notes'] = null; + } //make sure we're not double-listing types $meetings[$i]['types'] = array_unique($meetings[$i]['types']); diff --git a/includes/save.php b/includes/save.php index f54347cb..65f3378e 100644 --- a/includes/save.php +++ b/includes/save.php @@ -28,7 +28,7 @@ function tsml_save_post($post_id, $post, $update) { $update = ($post->post_date !== $post->post_modified); //sanitize strings (website, website_2, paypal are not included) - $strings = array('post_title', 'location', 'formatted_address', 'mailing_address', 'venmo', 'square', 'post_status', 'group', 'last_contact', 'conference_phone'); + $strings = array('post_title', 'location', 'formatted_address', 'mailing_address', 'venmo', 'square', 'post_status', 'group', 'last_contact', 'conference_url_notes', 'conference_phone', 'conference_phone_notes'); foreach ($strings as $string) { $_POST[$string] = stripslashes(sanitize_text_field($_POST[$string])); } @@ -94,19 +94,39 @@ function tsml_save_post($post_id, $post, $update) { $changes[] = 'conference_url'; if (empty($valid_conference_url)) { delete_post_meta($post->ID, 'conference_url'); + delete_post_meta($post->ID, 'conference_url_notes'); } else { update_post_meta($post->ID, 'conference_url', $valid_conference_url); } } + + if (!$update || strcmp($old_meeting->conference_url_notes, $_POST['conference_url_notes']) !== 0) { + $changes[] = 'conference_url_notes'; + if (empty($_POST['conference_url_notes'])) { + delete_post_meta($post->ID, 'conference_url_notes'); + } else { + update_post_meta($post->ID, 'conference_url_notes', $_POST['conference_url_notes']); + } + } if (!$update || strcmp($old_meeting->conference_phone, $_POST['conference_phone']) !== 0) { $changes[] = 'conference_phone'; if (empty($_POST['conference_phone'])) { delete_post_meta($post->ID, 'conference_phone'); + delete_post_meta($post->ID, 'conference_phone_notes'); } else { update_post_meta($post->ID, 'conference_phone', $_POST['conference_phone']); } } + + if (!$update || strcmp($old_meeting->conference_phone_notes, $_POST['conference_phone_notes']) !== 0) { + $changes[] = 'conference_phone_notes'; + if (empty($_POST['conference_phone_notes'])) { + delete_post_meta($post->ID, 'conference_phone_notes'); + } else { + update_post_meta($post->ID, 'conference_phone_notes', $_POST['conference_phone_notes']); + } + } //compare types if (tsml_program_has_types() && (!$update || implode(', ', $old_meeting->types) != tsml_meeting_types($_POST['types']))) { diff --git a/templates/single-meetings.php b/templates/single-meetings.php index e62ea7e1..6e12d4ea 100644 --- a/templates/single-meetings.php +++ b/templates/single-meetings.php @@ -97,7 +97,7 @@ function tsml_body_class($classes) { conference_url) || !empty($meeting->conference_phone)) {?> -
  • +
  • @@ -110,6 +110,9 @@ function tsml_body_class($classes) { conference_url : sprintf(__('Join with %s', '12-step-meeting-list'), $provider)?> + conference_url_notes) {?> +

    conference_url_notes)?>

    + conference_phone)) {?> @@ -118,6 +121,9 @@ function tsml_body_class($classes) { + conference_phone_notes) {?> +

    conference_phone_notes)?>

    +
  • Date: Wed, 19 Aug 2020 07:22:14 -0700 Subject: [PATCH 06/11] preserving newlines in _notes fields --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 5e8cee93..c57f1912 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -1169,7 +1169,7 @@ function tsml_import_buffer_set($meetings, $data_source=null) { //have to compress types down real quick (only happens with json) if (is_array($value)) $value = implode(',', $value); - if (in_array($key, array('notes', 'location_notes', 'group_notes'))) { + if (tsml_string_ends($key, 'notes')) { $meetings[$i][$key] = sanitize_text_area($value); } else { $meetings[$i][$key] = sanitize_text_field($value); From f87c6f4184f6b86edb524b0dd136e5ace8b6535c Mon Sep 17 00:00:00 2001 From: tech2serve Date: Sat, 22 Aug 2020 13:22:56 -0600 Subject: [PATCH 07/11] 3.8.0RC Adds notes for online/phone meetings; fixes bugs --- .gitignore | 1 + 12-step-meeting-list.php | 4 ++-- readme.txt | 9 ++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2fa74f70..570f09b4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules .idea Dockerfile docker-compose.yml +.vscode diff --git a/12-step-meeting-list.php b/12-step-meeting-list.php index d8092a47..93b443c4 100644 --- a/12-step-meeting-list.php +++ b/12-step-meeting-list.php @@ -3,7 +3,7 @@ Plugin Name: 12 Step Meeting List Plugin URI: https://wordpress.org/plugins/12-step-meeting-list/ Description: Manage a list of recovery meetings -Version: 3.7.2 +Version: 3.8.0 Author: Code4Recovery Author URI: https://github.com/code4recovery/12-step-meeting-list Text Domain: 12-step-meeting-list @@ -23,7 +23,7 @@ } if (!defined('TSML_VERSION')) { - define('TSML_VERSION', '3.7.2'); + define('TSML_VERSION', '3.8.0'); } //include these files first diff --git a/readme.txt b/readme.txt index 1016d1bc..6bd50790 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: aasanjose Requires at least: 3.2 Tested up to: 5.4.2 -Stable tag: 3.7.2 +Stable tag: 3.8.0 This plugin helps twelve step recovery programs list their meetings. It standardizes addresses, and displays results in a searchable list and map. @@ -205,6 +205,13 @@ To apply these changes, you must go to Settings > Permalinks and click "Save Cha == Changelog == += 3.8.0 = +* Adds notes fields for online/phone meetings. +* Fixes bug preventing selection of multiple types. +* Fixes bug preventing customized meeting URL. +* Fixes bug involving meetings in draft status stripping location. +* Fixes classname issue with online meeting provider. + = 3.7.2 = * Fixed bug involving end_time for meeting. From f5100fd4e7db29435ad6dafb84f13819cc05b376 Mon Sep 17 00:00:00 2001 From: Josh Reisner <1551689+joshreisner@users.noreply.github.com> Date: Sat, 29 Aug 2020 07:31:55 -0700 Subject: [PATCH 08/11] fix for boston aa --- includes/variables.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/variables.php b/includes/variables.php index f54875df..19ae0227 100644 --- a/includes/variables.php +++ b/includes/variables.php @@ -162,6 +162,12 @@ 'latitude' => 42.441700, 'longitude' => -72.800560, ), + '457 Main St, Stoneham, MA 02180, USA' => array( + 'formatted_address' => '457 Main St, Stoneham, MA 02180, USA', + 'city' => 'Stoneham', + 'latitude' => 42.476460, + 'longitude' => -71.100517, + ), '4125 Cedar Run Rd, Traverse City, MI 49684, USA' => array( 'formatted_address' => '4125 Cedar Run Rd, Traverse City, MI 49684, USA', 'city' => 'Traverse City', From 43a6b46fbc43764980e2ece4645e8d8ed0dbfaa5 Mon Sep 17 00:00:00 2001 From: Josh Reisner <1551689+joshreisner@users.noreply.github.com> Date: Sat, 5 Sep 2020 13:00:03 -0700 Subject: [PATCH 09/11] adding new program for #152 (#157) --- includes/variables.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/includes/variables.php b/includes/variables.php index 19ae0227..433ee68f 100644 --- a/includes/variables.php +++ b/includes/variables.php @@ -740,6 +740,30 @@ function tsml_define_strings() { 'Y' => __('Young People', '12-step-meeting-list'), ), ), + 'cea-how' => array( + 'abbr' => __('CEA-HOW', '12-step-meeting-list'), + 'flags' => array(), //for /men and /women at end of meeting name (used in tsml_format_name()) + 'name' => __('Compulsive Eaters Anonymous-HOW', '12-step-meeting-list'), + 'types' => array( + '12x12' => __('12 Steps & 12 Traditions', '12-step-meeting-list'), + 'AACOA' => __('AA Comes of Age', '12-step-meeting-list'), + 'ABSI' => __('As Bill Sees It', '12-step-meeting-list'), + 'B' => __('Big Book', '12-step-meeting-list'), + 'BOOK' => __('Book Study', '12-step-meeting-list'), + 'CTB' => __('Came to Believe', '12-step-meeting-list'), + 'CEA-HOW' => __('CEA-HOW Concept/Tools', '12-step-meeting-list'), + 'DR' => __('Daily Reflections', '12-step-meeting-list'), + 'HJF' => __('Happy Joyous and Free', '12-step-meeting-list'), + 'LS' => __('Living Sober', '12-step-meeting-list'), + 'MAINT' => __('Maintenance', '12-step-meeting-list'), + 'MED' => __('Meditation', '12-step-meeting-list'), + 'SP' => __('Pitch/Speaker', '12-step-meeting-list'), + 'PROM' => __('Promises', '12-step-meeting-list'), + 'RANDR' => __('Relapse and Recovery', '12-step-meeting-list'), + 'ST' => __('Steps/Traditions', '12-step-meeting-list'), + 'D' => __('Topic/Discussion', '12-step-meeting-list'), + ), + ), 'da' => array( 'abbr' => __('DA', '12-step-meeting-list'), 'flags' => array('M', 'W', 'TC', 'ONL'), //for /men and /women at end of meeting name (used in tsml_format_name()) From 253edcee09eee029ad04e14d4d96af7c2af281cf Mon Sep 17 00:00:00 2001 From: Josh Reisner <1551689+joshreisner@users.noreply.github.com> Date: Sat, 5 Sep 2020 13:00:19 -0700 Subject: [PATCH 10/11] Fixing jQuery Warning (#160) * adding new program for #152 * replacing size() with length for #159 --- .prettierrc | 6 +- assets/js/admin.min.js | 2 +- assets/js/public.min.js | 2 +- assets/src/admin.js | 339 +++++++------ assets/src/public.js | 1000 ++++++++++++++++++++++----------------- 5 files changed, 755 insertions(+), 594 deletions(-) diff --git a/.prettierrc b/.prettierrc index 36b35631..98c3bf85 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,7 @@ { - "trailingComma": "none" + "trailingComma": "none", + "singleQuote": true, + "printWidth": 140, + "bracketSpacing": false, + "useTabs": true } diff --git a/assets/js/admin.min.js b/assets/js/admin.min.js index 0db40514..99ed9061 100644 --- a/assets/js/admin.min.js +++ b/assets/js/admin.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(t){var e=t[0];return e.offsetWidth>0&&e.offsetHeight>0}function i(e){if(e.minTime&&(e.minTime=_(e.minTime)),e.maxTime&&(e.maxTime=_(e.maxTime)),e.durationTime&&"function"!=typeof e.durationTime&&(e.durationTime=_(e.durationTime)),"now"==e.scrollDefault)e.scrollDefault=function(){return e.roundingFunction(_(new Date),e)};else if(e.scrollDefault&&"function"!=typeof e.scrollDefault){var i=e.scrollDefault;e.scrollDefault=function(){return e.roundingFunction(_(i),e)}}else e.minTime&&(e.scrollDefault=function(){return e.roundingFunction(e.minTime,e)});if("string"===t.type(e.timeFormat)&&e.timeFormat.match(/[gh]/)&&(e._twelveHourTime=!0),!1===e.showOnFocus&&-1!=e.showOn.indexOf("focus")&&e.showOn.splice(e.showOn.indexOf("focus"),1),e.disableTimeRanges.length>0){for(var n in e.disableTimeRanges)e.disableTimeRanges[n]=[_(e.disableTimeRanges[n][0]),_(e.disableTimeRanges[n][1])];e.disableTimeRanges=e.disableTimeRanges.sort(function(t,e){return t[0]-e[0]});for(n=e.disableTimeRanges.length-1;n>0;n--)e.disableTimeRanges[n][0]<=e.disableTimeRanges[n-1][1]&&(e.disableTimeRanges[n-1]=[Math.min(e.disableTimeRanges[n][0],e.disableTimeRanges[n-1][0]),Math.max(e.disableTimeRanges[n][1],e.disableTimeRanges[n-1][1])],e.disableTimeRanges.splice(n,1))}return e}function n(e){var i=e.data("timepicker-settings"),n=e.data("timepicker-list");if(n&&n.length&&(n.remove(),e.data("timepicker-list",!1)),i.useSelect){n=t("",{class:"ui-timepicker-select"}),e.attr("name")&&n.attr("name","ui-timepicker-"+e.attr("name"));var a=n}else{n=t("