blob: ed046fcc3876808294563daebe9c7a9715182483 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
namespace Bitweaver\Liberty;
/**
* @version $Revision$
* @package liberty
* @subpackage plugins_format
*/
global $gLibertySystem;
/**
* definitions
*/
define( 'PLUGIN_GUID_SIMPLETEXT', 'simpletext' );
$pluginParams = [
'load_function' => 'simpletext_parse_data',
'verify_function' => 'simpletext_verify_data',
'description' => 'Simple Syntax Format Parser',
'edit_label' => 'Plain Text',
'edit_field' => PLUGIN_GUID_SIMPLETEXT,
'help_page' => 'SimpleTextSyntax',
'plugin_type' => FORMAT_PLUGIN,
'linebreak' => '<br />',
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_SIMPLETEXT, $pluginParams );
function simpletext_verify_data( &$pParamHash ) {
$pParamHash['content_store']['data'] = $pParamHash['edit'];
}
function simpletext_parse_data( &$pParseHash, &$pCommonObject ) {
return nl2br( htmlentities( $pParseHash['data'] ) );
}
|