public static function LingotekConfigChunk::unfilterPlaceholders in Lingotek Translation 7.3
Unwrap placeholder tags in specific tags that will be ignored by Lingotek
Parameters
$segment_text: a string containing the segment that potentially contains drupal variables
Return value
string the original input less any additional reference tags added prior to upload
1 call to LingotekConfigChunk::unfilterPlaceholders()
- LingotekConfigChunk::saveSegmentTranslations in lib/
Drupal/ lingotek/ LingotekConfigChunk.php - Save segment target translations for the given language
File
- lib/
Drupal/ lingotek/ LingotekConfigChunk.php, line 580 - Defines LingotekConfigChunk.
Class
- LingotekConfigChunk
- A class wrapper for Lingotek-specific behavior on ConfigChunks.
Code
public static function unfilterPlaceholders($segment_text) {
// WTD: this regex needs to be verified to align with all possible variable names
$pattern = '/<\\/?drupalvar>/';
$replacement = '';
return preg_replace($pattern, $replacement, $segment_text);
}