Modified deprecated preg_replace call with "eval" modifier to use preg_replace_callback instead (PHP >=5.3)