Elementor\TemplateLibrary\Manager::export_template PHP Method

export_template() public method

public export_template ( array $args )
$args array
    public function export_template(array $args)
    {
        // TODO: Add nonce for security
        $validate_args = $this->ensure_args(['source', 'template_id'], $args);
        if (is_wp_error($validate_args)) {
            return $validate_args;
        }
        $source = $this->get_source($args['source']);
        if (!$source) {
            return new \WP_Error('template_error', 'Template source not found.');
        }
        // If you reach this line, the export was not successful
        return $source->export_template($args['template_id']);
    }