Elementor\TemplateLibrary\Manager::update_template PHP Метод

update_template() публичный Метод

public update_template ( array $template_data )
$template_data array
    public function update_template(array $template_data)
    {
        $validate_args = $this->ensure_args(['source', 'data'], $template_data);
        if (is_wp_error($validate_args)) {
            return $validate_args;
        }
        $source = $this->get_source($template_data['source']);
        if (!$source) {
            return new \WP_Error('template_error', 'Template source not found.');
        }
        $template_data['data'] = json_decode(stripslashes(html_entity_decode($template_data['data'])), true);
        $update = $source->update_item($template_data);
        if (is_wp_error($update)) {
            return $update;
        }
        return $source->get_item($template_data['id']);
    }