Skip to content

Commit

Permalink
Update crouton.php
Browse files Browse the repository at this point in the history
  • Loading branch information
otrok7 committed Oct 11, 2023
1 parent aad2e82 commit ec63d9b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions crouton.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,16 @@ public function hasShortcode()

foreach ($matches as $shortcode) {
if ($shortcode[2] === 'bmlt_tabs') {
// This is a bad-smell. It is a side effect.
// Also, it seems wrong to output this HTML during the enqueue scripts phase, but that's how 3.15 worked
echo '<div class="bootstrap-bmlt" id="please-wait"><button class="btn btn-lg btn-info"><span class="glyphicon glyphicon-repeat glyphicon-repeat-animate"></span>Fetching...</button></div>';
$split = explode("show_map", $shortcode[3]);
if (count($split) > 1) {
$this->hasMap = true;
}
if ($_GET['meeting-id']) {
$this->hasMap = true;
} else {
// This is a bad-smell. It is a side effect.
// Also, it seems wrong to output this HTML during the enqueue scripts phase, but that's how 3.15 worked
echo '<div class="bootstrap-bmlt" id="please-wait"><button class="btn btn-lg btn-info"><span class="glyphicon glyphicon-repeat glyphicon-repeat-animate"></span>Fetching...</button></div>';
$split = explode("show_map", $shortcode[3]);
if (count($split) > 1) {
$this->hasMap = true;
}
}
}
if ($shortcode[2] === 'bmlt_handlebar') {
Expand Down Expand Up @@ -407,7 +408,7 @@ private function getMapInitialization($mapConfig)
$externalMap,
isset($config['language']) ? substr($config['language'], 0, 2) : 'en',
"croutonMap",
(empty($params['meeting_details_href'])) ? $_SERVER["REQUEST_URI"] : $params['meeting_details_href']
$this->options['meeting_details_href']
);
}
}
Expand Down Expand Up @@ -1120,6 +1121,8 @@ public function getCroutonJsConfig($atts)
if (empty($params['meeting_details_href'])) {
$params['meeting_details_href'] = $_SERVER["REQUEST_URI"];
}
$this->options['meeting_details_href'] = $params['meeting_details_href'];

$params['force_rootserver_in_querystring'] = ($params['root_server'] !== $this->options['root_server']);
$params = apply_filters('crouton_configuration', $params);
$mapParams['theme'] = $params['theme'];
Expand Down

0 comments on commit ec63d9b

Please sign in to comment.