You are here

function lingotek_unfilter_placeholders in Lingotek Translation 7.6

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.5 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

3 calls to lingotek_unfilter_placeholders()
LingotekConfigSet::saveSegmentTranslations in lib/Drupal/lingotek/LingotekConfigSet.php
Save segment target translations for the given language
lingotek_lingotek_entity_download_alter in ./lingotek.module
Implements hook_lingotek_entity_download_alter().
lingotek_process_entity_xml in ./lingotek.remote.inc

File

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

Code

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