HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/TemplateTransformer.php.tar
wp-content/plugins/woocommerce/src/Internal/Admin/BlockTemplateRegistry/TemplateTransformer.php000064400000002575151552665230037336 0ustar00var/www/vhosts/uyarreklam.com.tr/httpdocs<?php

namespace Automattic\WooCommerce\Internal\Admin\BlockTemplateRegistry;

use Automattic\WooCommerce\Admin\BlockTemplates\BlockTemplateInterface;

/**
 * Template transformer.
 */
class TemplateTransformer {

    /**
	 * Transform the WooCommerceBlockTemplate to a WP_Block_Template.
	 *
	 * @param object $block_template The product template.
	 */
	public function transform( BlockTemplateInterface $block_template ): \WP_Block_Template {
		$template                 = new \WP_Block_Template();
		$template->id             = $block_template->get_id();
		$template->theme          = 'woocommerce/woocommerce';
		$template->content        = $block_template->get_formatted_template();
		$template->source         = 'plugin';
		$template->slug           = $block_template->get_id();
		$template->type           = 'wp_template';
		$template->title          = $block_template->get_title();
		$template->description    = $block_template->get_description();
		$template->status         = 'publish';
		$template->has_theme_file = true;
		$template->origin         = 'plugin';
		$template->is_custom      = false; // Templates loaded from the filesystem aren't custom, ones that have been edited and loaded from the DB are.
		$template->post_types     = array(); // Don't appear in any Edit Post template selector dropdown.
		$template->area           = $block_template->get_area();

		return $template;
	}

}