diff --git a/public/class-wplibcalhours-public.php b/public/class-wplibcalhours-public.php index 14c7204..bd90395 100644 --- a/public/class-wplibcalhours-public.php +++ b/public/class-wplibcalhours-public.php @@ -247,12 +247,14 @@ protected function extract_hours( array $weeks_raw_data ) { $text = __( 'closed', 'wplibcalhours' ); break; default: - if ( array_key_exists( 'hours', $day_raw['times'] ) - && ! empty( $day_raw['times']['hours'] ) - && array_key_exists( 'from', $day_raw['times']['hours'][0] ) - && array_key_exists( 'to', $day_raw['times']['hours'][0] ) - ) { - $text = $day_raw['times']['hours'][0]['from'] . ' - ' . $day_raw['times']['hours'][0]['to']; + if ( array_key_exists( 'hours', $day_raw['times'] ) && ! empty( $day_raw['times']['hours'] )) { + $hours_text = []; + foreach( $day_raw['times']['hours'] as $hours ) { + if (array_key_exists( 'from', $hours ) && array_key_exists( 'to', $hours )) { + $hours_text[] = $hours['from'] . ' - ' . $hours['to']; + } + } + $text = implode( '
', $hours_text ); } } $days[ $day_raw['date'] ] = $text; diff --git a/public/css/wplibcalhours-public.css b/public/css/wplibcalhours-public.css index 4f91dcb..f9f09d7 100644 --- a/public/css/wplibcalhours-public.css +++ b/public/css/wplibcalhours-public.css @@ -13,3 +13,7 @@ .wplibcalhours .next { float: right; } + +.wplibcalhours tbody td { + vertical-align: top; +}