You are here

function lingotek_unfilter_placeholders in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_unfilter_placeholders()
  2. 7.4 lingotek.util.inc \lingotek_unfilter_placeholders()
  3. 7.6 lingotek.util.inc \lingotek_unfilter_placeholders()

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

2 calls to lingotek_unfilter_placeholders()
LingotekConfigChunk::saveSegmentTranslations in lib/Drupal/lingotek/LingotekConfigChunk.php
Save segment target translations for the given language
lingotek_process_entity_xml in ./lingotek.remote.inc

File

./lingotek.util.inc, line 1382
Utility functions.

Code

function lingotek_unfilter_placeholders($segment_text) {
  $pattern = '/<\\/?drupalvar>/';
  $replacement = '';
  return preg_replace($pattern, $replacement, $segment_text);
}