Skip to content

Commit

Permalink
Documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
otrok7 committed Dec 11, 2023
1 parent 1787847 commit fe7881f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 23 deletions.
6 changes: 3 additions & 3 deletions crouton.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function __construct()
&$this,
"croutonMap"
));
add_shortcode('meeting_map', array(
add_shortcode('bmlt_map', array(
&$this,
"meetingMap"
));
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down
23 changes: 6 additions & 17 deletions partials/_instructions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<p>Crouton defines the following shortcodes.</p>
<ul>
<li><code>[bmlt_tabs]</code> -- generates a tabbed meeting list</li>
<li><code>[crouton_map]</code> -- generates a map-based interface (see "Map Search" below for details)</li>
<li><code>[crouton_map]</code> -- generates a map-based interface from which geographic queries can be made. See "Map Search" below for details.</li>
<li><code>[bmlt_map]</code> -- generates a map-based interface suitible for mobile devices. Queries to the BMLT database, along with the available filters, are control by the usual <code>[bmlt_tabs]</code> parameters.</li>
<li><code>[meeting_count]</code></li>
<li><code>[group_count]</code></li>
<li><code>[service_body_names]</code></li>
Expand Down Expand Up @@ -86,26 +87,15 @@
<p>weekday = view meetings by Weekdays (default)</p>
<p>Another example could be "location_municipality", which would show city if it were available as a button.</p>
</div>
<h3 class="help-accordian"><strong>View By Language or Common Need</strong></h3>
<div>
<p>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.</p>
<p><strong>[bmlt_tabs view_by="weekday"]</strong></p>
<p>weekday = view meetings by Weekdays (default)</p>
<p>Another example could be "location_municipality", which would show city if it were available as a button.</p>
</div>
<h3 class="help-accordian"><strong>Exclude City Button</strong></h3>
<div>
<p>With this parameter you can exclude the City button.</p>
<p><strong>[bmlt_tabs include_city_button="0|1"]</strong></p>
<p>0 = exclude City button</p>
<p>1 = include City button (default)</p>
<p><em>City button will be included when view_by = "city" (include_city_button will be set to "1").</em></p>
</div>
<h3 class="help-accordian"><strong>Show Filter Buttons</strong></h3>
<div>
<p>With this parameter you can include specific buttons.</p>
<p><strong>[bmlt_tabs button_filters_option="City:location_municipality"]</strong></p>
<p>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.</p>
<p>The "City" button shown in the example above is defined by default. To disable it, you may use:</p>
<p><strong>[bmlt_tabs include_city_button="0|1"]</strong></p>
<p>0 = exclude City button</p>
<p>1 = include City button (default)</p>
</div>
<h3 class="help-accordian"><strong>Show Format Filter Buttons</strong></h3>
<div>
Expand Down Expand Up @@ -277,7 +267,6 @@
<p><strong>[crouton_map map_search_latitude="0" map_search_longitude="0"]</strong> - specifies the starting latitude and longitude in the map view (default: 0, 0).</p>
<p><strong>[crouton_map map_search_zoom="10"]</strong> - specifies the starting zoom level on the map (default: 10).</p>
<p><strong>[crouton_map map_search_width="-50"]</strong> - 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]).</p>
<p><em>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 <a target="_blank" href="https://bmlt.app/google-api-key/">https://bmlt.app/google-api-key/</a></em></p>
</div>
<h3 class="help-accordian"><strong>Extending Crouton</strong></h3>
<div>
Expand Down
7 changes: 4 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Contributors: odathp, otrok7, radius314, pjaudiomv, californiasteve9390, Paul N, alanb2718, jbraswell
Tags: na, meeting list, meeting finder, maps, recovery, addiction, webservant, bmlt
Requires at least: 4.0
Required PHP: 5.6
Tested up to: 6.2.2
Required PHP: 8.0
Tested up to: 6.4.2
Stable tag: 3.18.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -37,11 +37,12 @@ https://demo.bmlt.app/crouton
== Changelog ==

= 3.18.0 =
* Merge with BMLT-Meeting-Map
* New shortcode, [bmlt_map], presents a mobile friendly, map based interface.
* All Maps can be either OSM or Google Maps
* Admins can set clustering zoom level, above clustering, below, red/blue NA Markers
* Markers show multiple meetings in accordion. No "spiders".
* Popup text configurable through handlebars.
* Admin page organized into tabs

= 3.17.10 =
* Bug fix release - Fix some PHP warnings
Expand Down

0 comments on commit fe7881f

Please sign in to comment.