コード例 #1
0
 /**
  * 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;
     }
 }
コード例 #2
0
 /**
  * @param $shortcode
  * @param $callback
  */
 public function registerShortcode($shortcode, $callback)
 {
     DoxterShortcodeParser::instance()->registerShortcode($shortcode, $callback);
 }