/** * Parses the shortcode content after initial parsing if inner tags are found * * @return \Twig_Markup */ public function parseContent() { if (!empty($this->content)) { if (strpos($this->content, '[') !== false || strpos($this->content, '{') !== false) { return DoxterShortcodeParser::instance()->parse($this->content); } return $this->content; } }
/** * @param $shortcode * @param $callback */ public function registerShortcode($shortcode, $callback) { DoxterShortcodeParser::instance()->registerShortcode($shortcode, $callback); }