Guest User

Untitled

a guest
Oct 10th, 2019
22
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div class="fitplan-wrapper" id="fitplan-<?php echo $attributes['id']; ?>">
  2.  
  3. <div class="fitplan-planning fitplan-planning-<?php echo $attributes['id']; ?>" style="background-color: <?php echo $this->datas['fitplan_planning_background_color']; ?>; border-color: <?php echo $this->datas['fitplan_planning_border_color']; ?>;">
  4. <?php
  5. foreach($this->datas['weekdays'] as $day):
  6. if($day['displayed']):
  7. ?>
  8. <div class="fitplan-planning-day fitplan-planning-day-<?php echo $day['slug']; ?>" style="color: <?php echo $this->datas['fitplan_planning_days_text_color']; ?>; border-color:<?php echo $this->datas['fitplan_planning_border_color']; ?>;">
  9. <div class="fitplan-planning-title" style="border-color: <?php echo $this->datas['fitplan_planning_border_color']; ?>;"><?php echo $day['name']; ?></div>
  10.  
  11. <?php if($this->datas['fitplan_planning_show_morning']): ?>
  12. <div class="fitplan-planning-morning" style="height: <?php echo $this->datas['planning_height']['morning']; ?>px; border-color: <?php echo $this->datas['fitplan_planning_border_color']; ?>; border-color: <?php echo $this->datas['fitplan_planning_border_color']; ?>;">
  13. <?php
  14. if(isset($this->datas['planning'])):
  15. $sortedEntries = array();
  16. foreach($this->datas['planning'][$day['slug']] as $id => $entry):
  17. if($entry['time'] == "morning"){
  18. $sortedEntries[$id] = $entry;
  19. }
  20. endforeach;
  21. array_multisort(array_column($sortedEntries, 'top'), SORT_ASC, SORT_NUMERIC, $sortedEntries);
  22. foreach($sortedEntries as $id => $entry):
  23. if($entry['time'] == "morning"){
  24. include 'parts/planning-item.php';
  25. }
  26. endforeach;
  27. endif;
  28. ?>
  29. </div>
  30. <?php endif; ?>
  31.  
  32. <?php if($this->datas['fitplan_planning_show_afternoon']): ?>
  33. <div class="fitplan-planning-afternoon" style="height: <?php echo $this->datas['planning_height']['afternoon']; ?>px">
  34. <?php
  35. if(isset($this->datas['planning'])):
  36. $sortedEntries = array();
  37. foreach($this->datas['planning'][$day['slug']] as $id => $entry):
  38. if($entry['time'] == "afternoon"){
  39. $sortedEntries[$id] = $entry;
  40. }
  41. endforeach;
  42. array_multisort(array_column($sortedEntries, 'top'), SORT_ASC, SORT_NUMERIC, $sortedEntries);
  43. foreach($sortedEntries as $id => $entry):
  44. if($entry['time'] == "afternoon"){
  45. include 'parts/planning-item.php';
  46. }
  47. endforeach;
  48. endif;
  49. ?>
  50. </div>
  51. <?php endif; ?>
  52.  
  53. </div>
  54. <?php
  55. endif;
  56. endforeach;
  57. ?>
  58. </div>
  59. </div>
RAW Paste Data