You are here

function lingotek_unfilter_placeholders in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.4 lingotek.util.inc \lingotek_unfilter_placeholders()
  2. 7.5 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

4 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
lingotek_process_menu_link_xml in ./lingotek.remote.inc
Inserts newly downloaded menu link data into the menu_links table

File

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

Code

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