function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     // define custom tags
     $this->addTags('wikipedia');
     $this->addAttributes('language');
 }
Beispiel #2
0
 static function get($text)
 {
     // pass the parent page if available
     if (is_object($text)) {
         self::$obj = $text->parent;
     }
     $text = preg_replace_callback('!(?=[^\\]])\\((' . implode('|', self::$tags) . '):(.*?)\\)!i', 'kirbytext::parse', $text);
     $text = preg_replace_callback('!```(.*?)```!is', 'kirbytext::code', $text);
     return $text;
 }
Beispiel #3
0
function gist($url, $file = false)
{
    $name = kirbytext::classname();
    $obj = new $name();
    return $obj->gist(array('gist' => $url, 'file' => $file));
}
 /**
  * Load all default extensions
  */
 public function extensions()
 {
     // load all kirby tags and field methods
     include_once __DIR__ . DS . 'extensions' . DS . 'tags.php';
     include_once __DIR__ . DS . 'extensions' . DS . 'methods.php';
     // install additional kirby tags
     kirbytext::install($this->roots->tags());
 }
 function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('sublime');
     $this->addAttributes('uid', 'name');
 }
Beispiel #6
0
 /**
  * Load all default extensions
  */
 public function extensions()
 {
     // load all kirby tags and field methods
     include_once __DIR__ . DS . 'extensions' . DS . 'tags.php';
     include_once __DIR__ . DS . 'extensions' . DS . 'methods.php';
     // install additional kirby tags
     kirbytext::install($this->roots->tags());
     // install the smartypants class if enabled
     if ($this->options['smartypants']) {
         include_once __DIR__ . DS . 'vendors' . DS . 'smartypants.php';
     }
 }
 function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('sublime');
     $this->addAttributes('poster', 'video1', 'video2');
 }
function kirbytextSans($text = '')
{
    $text = kirbytext::init($text, true);
    return preg_replace('/<p>(.*)<\\/p>/', '$1', $text);
}
 function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('minigallery');
     $this->addAttributes('crop', 'quality', 'titles', 'rel', 'fancybox', 'class');
 }
 function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('image');
     $this->addAttributes('caption');
 }
Beispiel #11
0
 protected static function tags()
 {
     // load all kirby tags
     include_once __DIR__ . DS . 'config' . DS . 'kirbytext.php';
     // install additional kirby tags
     kirbytext::install(c::$data['root.tags']);
 }
Beispiel #12
0
 function __construct($text = false, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('resrc');
 }