PodsUI::do_template PHP Méthode

do_template() public méthode

public do_template ( $code, boolean | array $row = false ) : mixed
$code
$row boolean | array
Résultat 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;
    }