diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b5b44..556220d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.0.1 (released 2016-05-20) - Add lang to trans helper +- Add multiline support ## 1.0.0 (released 2016-05-11) diff --git a/src/helpers.php b/src/helpers.php index bce1352..d2cf19a 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -16,12 +16,13 @@ * Register translations. * * @param array $groups + * @param bool $multiline * * @throws \BadFunctionCallException * * @return void */ - function register_translations(array $groups) + function register_translations(array $groups, $multiline = false) { if (!function_exists('pll_register_string')) { throw new BadFunctionCallException('Please active the Polylang plugin.'); @@ -29,7 +30,7 @@ function register_translations(array $groups) foreach ($groups as $group => $translations) { foreach ($translations as $key => $description) { - pll_register_string($description, $key, $group); + pll_register_string($description, $key, $group, $multiline); } } }