From fe7881f7c89b912a0eabeb8fed4e005a6fc0698e Mon Sep 17 00:00:00 2001 From: otrok7 <50595291+otrok7@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:10:16 +0100 Subject: [PATCH] Documentation fixes --- crouton.php | 6 +++--- partials/_instructions.php | 23 ++++++----------------- readme.txt | 7 ++++--- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/crouton.php b/crouton.php index c498b97..f653c27 100644 --- a/crouton.php +++ b/crouton.php @@ -151,7 +151,7 @@ public function __construct() &$this, "croutonMap" )); - add_shortcode('meeting_map', array( + add_shortcode('bmlt_map', array( &$this, "meetingMap" )); @@ -182,7 +182,7 @@ private function hasShortcode() { $post_to_check = get_post(get_the_ID()); $post_content = $post_to_check->post_content ?? ''; - $tags = ['bmlt_tabs', 'meeting_map', 'crouton_map', 'bmlt_count', 'meeting_count', 'group_count', 'service_body_names', 'bmlt_handlebar']; + $tags = ['bmlt_tabs', 'bmlt_map', 'crouton_map', 'bmlt_count', 'meeting_count', 'group_count', 'service_body_names', 'bmlt_handlebar']; preg_match_all('/' . get_shortcode_regex($tags) . '/', $post_content, $matches, PREG_SET_ORDER); if (empty($matches)) { return false; @@ -204,7 +204,7 @@ private function hasShortcode() } if ($shortcode[2] === 'bmlt_handlebar' || $shortcode[2] === 'crouton_map' || - $shortcode[2] === 'meeting_map') { + $shortcode[2] === 'bmlt_map') { $this->hasMap = true; } } diff --git a/partials/_instructions.php b/partials/_instructions.php index 1975f00..aebb50e 100644 --- a/partials/_instructions.php +++ b/partials/_instructions.php @@ -5,7 +5,8 @@
Crouton defines the following shortcodes.
[bmlt_tabs]
-- generates a tabbed meeting list[crouton_map]
-- generates a map-based interface (see "Map Search" below for details)[crouton_map]
-- generates a map-based interface from which geographic queries can be made. See "Map Search" below for details.[bmlt_map]
-- generates a map-based interface suitible for mobile devices. Queries to the BMLT database, along with the available filters, are control by the usual [bmlt_tabs]
parameters.[meeting_count]
[group_count]
[service_body_names]
weekday = view meetings by Weekdays (default)
Another example could be "location_municipality", which would show city if it were available as a button.
-With this parameter you can initially view meetings by Weekday or any other field, as long as the button_filters_option was added ahead of time.
-[bmlt_tabs view_by="weekday"]
-weekday = view meetings by Weekdays (default)
-Another example could be "location_municipality", which would show city if it were available as a button.
-With this parameter you can exclude the City button.
-[bmlt_tabs include_city_button="0|1"]
-0 = exclude City button
-1 = include City button (default)
-City button will be included when view_by = "city" (include_city_button will be set to "1").
-With this parameter you can include specific buttons.
[bmlt_tabs button_filters_option="City:location_municipality"]
You can also include multiple buttons with a comma after each pair. Keep in mind that the first part is the word for the button. If using multilingual option, that word must have a translation.
+The "City" button shown in the example above is defined by default. To disable it, you may use:
+[bmlt_tabs include_city_button="0|1"]
+0 = exclude City button
+1 = include City button (default)
[crouton_map map_search_latitude="0" map_search_longitude="0"] - specifies the starting latitude and longitude in the map view (default: 0, 0).
[crouton_map map_search_zoom="10"] - specifies the starting zoom level on the map (default: 10).
[crouton_map map_search_width="-50"] - specifies how many meetings to return, a positive integer means how many miles or kilometers to search. A negative integer indicates the closest number of meetings from that point with no distance limits. (default: -50 [the fifty closest meetings to the point selected]).
-The Google API Key must be entered on the crouton settings page for this to work. You must have the 'Google Maps JavaScript API' enabled on your key. For more information on setting up and configuring a Google Maps API key check out this blog article https://bmlt.app/google-api-key/