1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 00:54:49 +02:00

Plugins: e_parse can now also hook into toDB() to modify content before it is stored in the database

This commit is contained in:
Cameron
2017-01-29 08:42:18 -08:00
parent 1ae16a6898
commit c552bb5a3f
2 changed files with 73 additions and 17 deletions

View File

@@ -32,6 +32,7 @@ class _blank_parse
/**
* Process a string before it is sent to the browser as html.
* @param string $text html/text to be processed.
* @param string $context Current context ie. OLDDEFAULT | BODY | TITLE | SUMMARY | DESCRIPTION | WYSIWYG etc.
* @return string
@@ -44,6 +45,22 @@ class _blank_parse
/**
* Process a string before it is saved to the database.
* @param string $text html/text to be processed.
* @param array $param nostrip, noencode etc.
* @return string
*/
function toDB($text, $param=array())
{
$text = str_replace('<hr />', '****', $text);
return $text;
}
}