function run($string)
 {
     if (!function_exists('typogrify')) {
         include_once EXTENSIONS . '/typogrify/lib/php-typogrify.php';
     }
     return stripslashes(typogrify($string));
 }
 function run($string)
 {
     if (!function_exists('Markdown')) {
         include_once EXTENSIONS . '/markdown/lib/markdown_extra.php';
     }
     if (!function_exists('typogrify')) {
         include_once EXTENSIONS . '/typogrify/lib/php-typogrify.php';
     }
     return stripslashes(typogrify(Markdown($string)));
 }
 function run($string)
 {
     if (!function_exists('typogrify')) {
         include_once EXTENSIONS . '/typogrify/lib/php-typogrify.php';
     }
     if (!class_exists('Textile')) {
         include_once EXTENSIONS . '/textile/lib/textile.php';
     }
     $textile = new Textile();
     return stripslashes(typogrify($textile->TextileThis($string)));
 }
Esempio n. 4
0
 /**
  * @param string $source
  *
  * @return string
  */
 public function addTypographyStyles($source)
 {
     if (!function_exists('typogrify')) {
         require_once dirname(__FILE__) . '/../common/parsedown/Typography.php';
     }
     try {
         return \typogrify($source);
     } catch (\Exception $e) {
         return $source;
     }
 }
 public function typogrifyFilter($str)
 {
     $charset = craft()->templates->getTwig()->getCharset();
     $str = typogrify($str);
     return new \Twig_Markup($str, $charset);
 }
 public function doxterTypography($source = '')
 {
     return TemplateHelper::getRaw(typogrify($source));
 }