PodsAPI::save_template PHP Method

save_template() public method

See also: PodsAPI::save_object Add or edit a Pod Template $params['id'] int The template ID $params['name'] string The template name $params['code'] string The template code
Since: 1.7.9
public save_template ( array | object $params, boolean $sanitized = false ) : integer
$params array | object An associative array of parameters
$sanitized boolean (optional) Decides wether the params have been sanitized before being passed, will sanitize them if false.
return integer The Template ID
    public function save_template($params, $sanitized = false)
    {
        $params = (object) $params;
        $params->type = 'template';
        return $this->save_object($params, $sanitized);
    }