/**
* @param $code
* @param bool|array $row
*
* @return mixed
*/
public function do_template($code, $row = false)
{
if (is_object($this->pod) && 1 == 0 && 0 < $this->pod->id()) {
return $this->pod->do_magic_tags($code);
} else {
if (false !== $row) {
$this->temp_row = $this->row;
$this->row = $row;
}
$code = preg_replace_callback("/({@(.*?)})/m", array($this, "do_magic_tags"), $code);
if (false !== $row) {
$this->row = $this->temp_row;
unset($this->temp_row);
}
}
return $code;
}