summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 74ab96e9..848d9204 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1415,7 +1415,10 @@ function wordfilters(&$body) {
foreach ($config['wordfilters'] as $filter) {
if (isset($filter[2]) && $filter[2]) {
- $body = preg_replace($filter[0], $filter[1], $body);
+ if (is_callable($filter[1]))
+ $body = preg_replace_callback($filter[0], $filter[1], $body);
+ else
+ $body = preg_replace($filter[0], $filter[1], $body);
} else {
$body = str_ireplace($filter[0], $filter[1], $body);
}