/** * @param $atts array inputs * @return string shortcode content */ public function handleShortcode($atts) { if (!isset($atts["id"])) { $entries = Entry::fetchAll(); } else { $entries = [Entry::find_one($atts["id"])]; } $collections = $this->buildCollections($entries); $exportedHTML = ''; foreach ($collections as $collection) { $exportedHTML .= $collection->export(); } return $exportedHTML; }