You are here

protected function Minifier::unlock in Advanced CSS/JS Aggregation 8.4

Same name and namespace in other branches
  1. 8.2 advagg_js_minify/jshrink.inc \JShrink\Minifier::unlock()
  2. 8.3 advagg_js_minify/jshrink.inc \JShrink\Minifier::unlock()
  3. 7.2 advagg_js_compress/jshrink.inc \JShrink\Minifier::unlock()

Replace "locks" with the original characters

Parameters

string $js The string to unlock:

Return value

bool

File

advagg_js_minify/jshrink.inc, line 616

Class

Minifier
Minifier

Namespace

JShrink

Code

protected function unlock($js) {
  if (empty($this->locks)) {
    return $js;
  }
  foreach ($this->locks as $lock => $replacement) {
    $js = str_replace($lock, $replacement, $js);
  }
  return $js;
}