Skip to content

Commit

Permalink
group by tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dgershman committed Jan 4, 2019
1 parent c38e316 commit 023b3f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bmlt-meeting-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ function bmlt_meeting_list($atts = null, $content = null) {
$x++;

if ( $this->options['meeting_sort'] === 'weekday_area' || $this->options['meeting_sort'] === 'weekday_city' || $this->options['meeting_sort'] === 'weekday_county' ) {
$current_weekday = 1;
$current_weekday = intval($this->options['weekday_start']);
$show_first_weekday = true;
}
foreach ($unique_data as $this_unique_value) {
Expand All @@ -933,6 +933,9 @@ function bmlt_meeting_list($atts = null, $content = null) {
$weekday_tinyint = intval($area_data[0]);
if ( $weekday_tinyint !== $current_weekday ) {
$current_weekday++;
if ($current_weekday > 7) {
$current_weekday = 1;
}
$show_first_weekday = true;
}
}
Expand Down Expand Up @@ -1047,7 +1050,7 @@ function bmlt_meeting_list($atts = null, $content = null) {
if ( $this->options['meeting_sort'] === 'weekday_area' || $this->options['meeting_sort'] === 'weekday_city' || $this->options['meeting_sort'] === 'weekday_county' ) {
if ( $newVal ) {
if ( $show_first_weekday === true ) {
if ( $current_weekday === 1 ) {
if ( $current_weekday === $this->options['weekday_start'] ) {
$header .= "<h2 style='".$header_style."'>".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])."</h2>";
} else {
$header .= "<h2 style='".$header_style."margin-top:2pt;'>".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])."</h2>";
Expand Down

0 comments on commit 023b3f5

Please sign in to comment.