+/**
+ * Replace markers in templates.
+ *
+ * Available markers have the scheme "###MARKERNAME###".
+ *
+ * @param $content string Template text with markers
+ * @param $htmllinebreaks boolean Convert linebreaks to BR-Tags
+ * @return Template with replaced markers
+ */
+function
+jirafeau_replace_markers ($content, $htmllinebreaks = false)
+{
+ $patterns = array(
+ '/###ORGANISATION###/',
+ '/###CONTACTPERSON###/'
+ );
+ $replacements = array(
+ '[ORGANISATION PROVIDING THIS WEBSITE]',
+ 'contact@[THIS WEBSITE]'
+ );
+ $content = preg_replace($patterns, $replacements, $content);
+
+ if (true === $htmllinebreaks) {
+ $content = nl2br($content);
+ }
+
+ return $content;
+}
\ No newline at end of file