diff --git a/bmlt-meeting-list.php b/bmlt-meeting-list.php index 07b209e..e3b59b0 100644 --- a/bmlt-meeting-list.php +++ b/bmlt-meeting-list.php @@ -919,6 +919,7 @@ function bmlt_meeting_list($atts = null, $content = null) { $header_style .= "background-color:".$this->options['header_background_color'].";"; $header_style .= "font-size:".$this->options['header_font_size']."pt;"; $header_style .= "line-height:".$this->options['content_line_height'].";"; + $header_style .= "text-align:center;padding-top:2px;padding-bottom:3px;"; if ( $this->options['header_uppercase'] == 1 ) { $header_style .= 'text-transform: uppercase;'; @@ -1044,9 +1045,9 @@ function bmlt_meeting_list($atts = null, $content = null) { $header_suffix = $this->options['county_suffix']; } if ( $newVal ) { - $header .= "

".$this_unique_data.''.$header_suffix."

"; + $header .= "
".$this_unique_data.''.$header_suffix."
"; } elseif ( $newCol ) { - $header .= "

".$this_unique_data.''.$header_suffix." " . $cont . "

"; + $header .= "
".$this_unique_data.''.$header_suffix." " . $cont . "
"; } } if ( $this->options['meeting_sort'] === 'neighborhood_city' ) { @@ -1055,19 +1056,19 @@ function bmlt_meeting_list($atts = null, $content = null) { if ( $newVal ) { if ( $meeting_value['location_neighborhood'] !== '' ) { - $header .= "

".$meeting_value['location_neighborhood'].''.$this->options['neighborhood_suffix']."

"; + $header .= "
".$meeting_value['location_neighborhood'].''.$this->options['neighborhood_suffix']."
"; } elseif ( $meeting_value['location_municipality'] !== '' ) { - $header .= "

".$meeting_value['location_municipality'].''.$this->options['city_suffix']."

"; + $header .= "
".$meeting_value['location_municipality'].''.$this->options['city_suffix']."
"; } else { - $header .= "

[NO NEIGHBORHOOD OR CITY DATA]

"; + $header .= "
[NO NEIGHBORHOOD OR CITY DATA]
"; } } elseif ( $newCol ) { if ( $meeting_value['location_neighborhood'] !== '' ) { - $header .= "

".$meeting_value['location_neighborhood'].''.$this->options['neighborhood_suffix']." " . $cont . "

"; + $header .= "
".$meeting_value['location_neighborhood'].''.$this->options['neighborhood_suffix']." " . $cont . "
"; } elseif ( $meeting_value['location_municipality'] !== '' ) { - $header .= "

".$meeting_value['location_municipality'].''.$this->options['city_suffix']." " . $cont . "

"; + $header .= "
".$meeting_value['location_municipality'].''.$this->options['city_suffix']." " . $cont . "
"; } else { - $header .= "

[NO NEIGHBORHOOD OR CITY DATA] " . $cont . "

"; + $header .= "
[NO NEIGHBORHOOD OR CITY DATA] " . $cont . "
"; } } } @@ -1075,19 +1076,19 @@ function bmlt_meeting_list($atts = null, $content = null) { if ( $newVal ) { if ( $show_first_weekday === true ) { if ( $current_weekday === $this->options['weekday_start'] ) { - $header .= "

".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])."

"; + $header .= "
".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])."
"; } else { - $header .= "

".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])."

"; + $header .= "
".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])."
"; } $show_first_weekday = false; } elseif ( utf8_encode($this->mpdf->y) == $this->options['margin_top'] ) { - $header .= "

".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])." " . $cont . "

"; + $header .= "
".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])." " . $cont . "
"; } $header .= $this->options['sub_header_shown'] == 1 ? "

".$area_name."

" : ""; } elseif ( utf8_encode($this->mpdf->y) == $this->options['margin_top'] ) { - $header .= "

".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])." " . $cont . "

"; + $header .= "
".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])." " . $cont . "
"; $header .= $this->options['sub_header_shown'] == 1 ? "

".$area_name."

" : ""; } } @@ -1096,23 +1097,23 @@ function bmlt_meeting_list($atts = null, $content = null) { $meeting_value['location_municipality'] = '[NO CITY DATA IN BMLT]'; } if ( $newVal ) { - $header .= "

".$meeting_value['location_municipality']."

"; + $header .= "
".$meeting_value['location_municipality']."
"; } elseif ( $newCol ) { - $header .= "

".$meeting_value['location_municipality']." " . $cont . "

"; + $header .= "
".$meeting_value['location_municipality']." " . $cont . "
"; } } if ( $this->options['meeting_sort'] === 'group' ) { if ( $newVal ) { - $header .= "

".$meeting_value['meeting_name']."

"; + $header .= "
".$meeting_value['meeting_name']."
"; } elseif ( $newCol ) { - $header .= "

".$meeting_value['meeting_name']." " . $cont . "

"; + $header .= "
".$meeting_value['meeting_name']." " . $cont . "
"; } } if ( $this->options['meeting_sort'] === 'day' ) { if ( $newVal ) { - $header .= "

".$this->getday($this_unique_value, false, $this->options['weekday_language'])."

"; + $header .= "
".$this->getday($this_unique_value, false, $this->options['weekday_language'])."
"; } elseif ( $newCol ) { - $header .= "

".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])." " . $cont . "

"; + $header .= "
".$this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language'])." " . $cont . "
"; } } if ( $this->options['meeting_sort'] === 'borough_county' ) { @@ -1121,19 +1122,19 @@ function bmlt_meeting_list($atts = null, $content = null) { if ( $newVal ) { if ( $meeting_value['location_city_subsection'] !== '' ) { - $header .= "

".$meeting_value['location_city_subsection'].''.$this->options['borough_suffix']."

"; + $header .= "
".$meeting_value['location_city_subsection'].''.$this->options['borough_suffix']."
"; } elseif ( $meeting_value['location_sub_province'] !== '' ) { - $header .= "

".$meeting_value['location_sub_province'].''.$this->options['county_suffix']."

"; + $header .= "
".$meeting_value['location_sub_province'].''.$this->options['county_suffix']."
"; } else { - $header .= "

[NO BOROUGH OR COUNTY DATA]

"; + $header .= "
[NO BOROUGH OR COUNTY DATA]
"; } } elseif ( $newCol ) { if ( $meeting_value['location_city_subsection'] !== '' ) { - $header .= "

".$meeting_value['location_city_subsection'].''.$this->options['borough_suffix']." " . $cont . "

"; + $header .= "
".$meeting_value['location_city_subsection'].''.$this->options['borough_suffix']." " . $cont . "
"; } elseif ( $meeting_value['location_sub_province'] !== '' ) { - $header .= "

".$meeting_value['location_sub_province'].''.$this->options['county_suffix']." " . $cont . "

"; + $header .= "
".$meeting_value['location_sub_province'].''.$this->options['county_suffix']." " . $cont . "
"; } else { - $header .= "

[NO BOROUGH OR COUNTY DATA] " . $cont . "

"; + $header .= "
[NO BOROUGH OR COUNTY DATA] " . $cont . "
"; } } } @@ -1300,12 +1301,11 @@ function bmlt_meeting_list($atts = null, $content = null) { $ph_footer_fix_bot = 5 - intval($this->options['margin_bottom']); } - if (isset($this->options['top'])) { - if (intval($this->options['margin_top']) < 5) { - $ph_footer_fix_top = 5 - intval($this->options['top']); - } + if (intval($this->options['margin_top']) < 5) { + $ph_footer_fix_top = isset($this->options['top']) ? 5 - intval($this->options['top']) : 5; } + $DAY_HEADER_HEIGHT = 5; $PH_FOOTER_MM = $DAY_HEADER_HEIGHT + $ph_footer_fix_top + $ph_footer_fix_bot;