Skip to content

Commit

Permalink
Merge branch 'main' into merge-with-meeting-map
Browse files Browse the repository at this point in the history
  • Loading branch information
otrok7 committed Dec 6, 2023
2 parents 187643c + 9dd0bd2 commit c368bac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
16 changes: 10 additions & 6 deletions crouton.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class Crouton
"sort_keys" => 'start_time',
"int_start_day_id" => '1',
"recurse_service_bodies" => '0',
"custom_css" => "",
"theme" => '',
"default_filter_dropdown" => '',
"meeting_data_template" => null,
Expand All @@ -106,7 +107,8 @@ class Crouton
"show_qrcode" => false,
"hide_byday_headers" => false,
"native_lang" => '',
"has_meeting_count" => false
"has_meeting_count" => false,
"google_api_key" => ""
);
private MeetingMap\Controller $meetingMapController;
public function __construct()
Expand Down Expand Up @@ -892,7 +894,9 @@ private function getOptions()

if (!isset($this->options['crouton_version'])) {
$this->options['crouton_version'] = "3.17";
$this->options['meeting_data_template'] = str_replace('{{this.meeting_name}}', "{{> meetingLink this}}", $this->options['meeting_data_template']);
if (isset($this->options['meeting_data_template'])) {
$this->options['meeting_data_template'] = str_replace('{{this.meeting_name}}', "{{> meetingLink this}}", $this->options['meeting_data_template']);
}
}
}
/**
Expand Down Expand Up @@ -1021,21 +1025,21 @@ private function getCroutonJsConfig($atts, $croutonMap = false)
$params['recurse_service_bodies'] = true;
} elseif (isset($_GET['recurse_service_bodies'])) {
$params['recurse_service_bodies'] = filter_var($_GET['recurse_service_bodies'], FILTER_VALIDATE_BOOLEAN);
} elseif (!isset($atts['recurse_service_bodies'])) {
$params['recurse_service_bodies'] = $this->options['recurse_service_bodies'];
}

$params['custom_query'] = $this->getCustomQuery($params['custom_query']);
$params['template_path'] = plugin_dir_url(__FILE__) . 'croutonjs/dist/templates/';
$params['theme'] = $params['theme'] != '' ? $params['theme'] : $this->options['theme'];
$params['custom_css'] = html_entity_decode($this->options['custom_css']);
$params['theme'] = $params['theme'] != '' ? $params['theme'] : 'jack';
$params['custom_css'] = html_entity_decode($params['custom_css']);
$params['int_include_unpublished'] = $params['include_unpublished'];

$params['meeting_data_template'] = $this->templateToParameter($atts, 'meeting_data_template');
$params['metadata_template'] = $this->templateToParameter($atts, 'metadata_template');
$params['meetingpage_title_template'] = $this->templateToParameter($atts, 'meetingpage_title_template');
$params['meetingpage_contents_template'] = $this->templateToParameter($atts, 'meetingpage_contents_template');

$mapParams['google_api_key'] = $params['google_api_key'];
$mapParams['template_path'] = $params['template_path'];
$extra_meetings_array = [];
if (isset($this->options['extra_meetings']) && !isset($_GET['meeting-id'])) {
foreach ($this->options['extra_meetings'] as $value) {
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ https://demo.bmlt.app/crouton
* Markers show multiple meetings in accordion. No "spiders".
* Popup text configurable through handlebars.

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

= 3.17.9 =
* Bug fix release - Shortcodes that are called before Enqueue_Scripts

Expand Down

0 comments on commit c368bac

Please sign in to comment.