'; // Header Section $plantext .= ''; // Basic Informations $plantext .= '
'; $plantext .= '
'; if (get_post_meta(get_the_ID(),'ao_workout_banner',true)['url'] != ''){ $plantext .= ''; }else{ $plantext .= ''; } $plantext .= '
'; $plantext .= '
'; $plantext .= ''; $plantext .= '
'; $plantext .= '
'; if (get_post_meta(get_the_ID(), 'ao_workout_description', true) != ''){ // Description $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= get_post_meta(get_the_ID(), 'ao_workout_description', true); $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; } // Weekdays $weekdays = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'); foreach($weekdays as $key){ if(get_post_meta(get_the_ID(), 'ao_workout_' . $key . '_enabled', true) == 'ao_workout_' . $key . '_enabled_1'){ $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '

' . ucfirst($key) . ' | ' . get_post_meta(get_the_ID(), 'ao_workout_' . $key . '_description', true) . ' | ' . get_post_meta(get_the_ID(), 'ao_workout_' . $key . '_duration', true) . '

'; $plantext .= '
'; $plantext .= '
'; // Exercise $count_ex = count(get_post_meta(get_the_ID(), 'ao_workout_' . $key . '_re', true)); foreach(get_post_meta(get_the_ID(), 'ao_workout_' . $key . '_re', true) as $arr){ $plantext .= '
'; if ($arr['ao_workout_' . $key . '_video'] != ''){ $plantext .= '
'; $plantext .= '
'; $plantext .= ''; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; }else{ $plantext .= '
'; } $plantext .= '
    '; if($arr['ao_workout_' . $key . '_exercise'] != ''){ $plantext .= '
  • ' . $arr['ao_workout_' . $key . '_exercise'] . '
  • '; } if($arr['ao_workout_' . $key . '_exercise_description'] != ''){ $plantext .= '
  • ' . $arr['ao_workout_' . $key . '_exercise_description'] . '
  • '; } if($arr['ao_workout_' . $key . '_sets'] != ''){ $plantext .= '
  • Sets: ' . $arr['ao_workout_' . $key . '_sets'] . '
  • '; } if($arr['ao_workout_' . $key . '_reps'] != ''){ $plantext .= '
  • Reps: ' . $arr['ao_workout_' . $key . '_reps'] . '
  • '; } $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; if ($count_ex > 1){ $plantext .= '
'; $count_ex--; } } $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; $plantext .= '
'; } } $plantext .= '
'; } return $content . $plantext; } ?>