mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-09 15:46:24 +02:00
34 lines
774 B
PHP
34 lines
774 B
PHP
<?php
|
|
|
|
/**
|
|
* Markdown plugin
|
|
*
|
|
* @package Monstra
|
|
* @subpackage Plugins
|
|
* @author Romanenko Sergey / Awilum
|
|
* @copyright 2014 Romanenko Sergey / Awilum
|
|
* @version 1.0.0
|
|
*
|
|
*/
|
|
|
|
// Register plugin
|
|
Plugin::register(__FILE__,
|
|
__('Markdown'),
|
|
__('Markdown markup language plugin for Monstra'),
|
|
'1.0.0',
|
|
'Awilum',
|
|
'http://monstra.org/');
|
|
|
|
// Uncomment code below to use Markdown on Site Content
|
|
Filter::add('content', 'markdown', 1);
|
|
|
|
use \Michelf\MarkdownExtra;
|
|
|
|
include PLUGINS . '/markdown/php-markdown/Michelf/Markdown.php';
|
|
include PLUGINS . '/markdown/php-markdown/Michelf/MarkdownExtra.php';
|
|
|
|
function markdown($content)
|
|
{
|
|
return MarkdownExtra::defaultTransform($content);
|
|
}
|