<!-- SHARED STORIES --> <?php if ($exchange->has_stories) { ?> <section class="collaboration__section collaboration__stories section--yellow-1-web section--coloured"> <?php echo BasePattern::build_edge_svg('top', exchange_slug_to_hex('yellow-1-web')); ?> <div class="section-inner"> <?php $exchange->publish_related_stories(); ?> </div><!--section-inner--> <?php echo BasePattern::build_edge_svg('bottom', exchange_slug_to_hex('yellow-1-web')); ?> </section> <?php } ?> </div> <!-- end articleBpdy --> <?php include_once get_stylesheet_directory() . '/parts/content-story-footer.php'; ?> </article> <!-- end article --> <?php
public function create_output() { if (!is_array($this->input['contents'])) { return; } $length = count($this->input['contents']); if (0 === $length) { return; } for ($i = 0; $i < $length; $i++) { if (!empty($this->input['contents'][$i]['acf_fc_layout'])) { $this->set_modifier_class('contents_' . $i, $this->input['contents'][$i]['acf_fc_layout']); } } // Check for background colour modifier and add to classes. if (!empty($this->input['background_colour'])) { $colour = $this->input['background_colour']; $this->set_modifier_class('colour', $colour); $this->set_modifier_class('style', 'coloured'); $this->set_attribute('data', 'background-colour', $colour); } // Open section with edge. $this->output_tag_open('section'); if (isset($colour)) { $this->output .= BasePattern::build_edge_svg('top', $colour); } $this->output .= '<div class="section-inner">'; $this->build_section_header(); foreach ($this->input['contents'] as $section_contents) { switch ($section_contents['acf_fc_layout']) { case 'has_map': $this->set_map_data($section_contents)->build_map(); break; case 'has_form': $this->build_form($section_contents); break; case 'has_grid': $this->build_simple_grid($section_contents); break; case 'has_story_elements': $this->build_story_elements($section_contents); break; case 'has_contact_details': $this->build_contact_block($section_contents); break; case 'has_social_icons': $this->build_social_icons($section_contents); break; } } $this->output .= '</div>'; // Close section with edge. if (isset($colour)) { $this->output .= BasePattern::build_edge_svg('bottom', $colour); } $this->output_tag_close('section'); }