---> Trasmissione conclusa <---
'; } else { $x = 0; do { $start_time = get_post_meta(get_the_ID(), 'on_air_start_'.$x, true); $cadence = get_post_meta(get_the_ID(), 'on_air_cadence_'.$x, true); $litteral_day = $week[((int)$day) - 1]; switch((int) $cadence) { case 2: //ogni 2 settimane case 3: //ogni 3 settimane case 4: //ogni 4 settimane $text = "$cadence $litteral_day"; break; case 5: //una volta al mese $start_date = get_post_meta(get_the_ID(), 'on_air_start_date_'.$x, true); $day_of_the_month = which_day_of_the_month(new DateTime($start_date)); $text = "{$day_of_the_month}a $litteral_day del mese"; break; default: //settimanale e altro non gestito (errori, etc.) $text = "$litteral_day"; break; } $content .= '---> In diretta ogni '.$text.' dalle ore '.$start_time.' <---
'; $x = $x + 1; $day = get_post_meta(get_the_ID(), 'on_air_day_'.$x, true); } while (!empty($day)); } return $content; } get_header();?>