Skip to content

Commit 2372db3

Browse files
committed
Add multiline support
1 parent 5feb57e commit 2372db3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 1.0.1 (released 2016-05-20)
44

55
- Add lang to trans helper
6+
- Add multiline support
67

78
## 1.0.0 (released 2016-05-11)
89

src/helpers.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@
1616
* Register translations.
1717
*
1818
* @param array $groups
19+
* @param bool $multiline
1920
*
2021
* @throws \BadFunctionCallException
2122
*
2223
* @return void
2324
*/
24-
function register_translations(array $groups)
25+
function register_translations(array $groups, $multiline = false)
2526
{
2627
if (!function_exists('pll_register_string')) {
2728
throw new BadFunctionCallException('Please active the Polylang plugin.');
2829
}
2930

3031
foreach ($groups as $group => $translations) {
3132
foreach ($translations as $key => $description) {
32-
pll_register_string($description, $key, $group);
33+
pll_register_string($description, $key, $group, $multiline);
3334
}
3435
}
3536
}

0 commit comments

Comments
 (0)