
<!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: post.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php
namespace ElementorPro\Modules\ThemeBuilder\Conditions;

use ElementorPro\Modules\QueryControl\Module as QueryModule;

if ( ! defined( &#039;ABSPATH&#039; ) ) {
	exit; // Exit if accessed directly
}

class Post extends Condition_Base {

	private $post_type;
	private $post_taxonomies;

	public static function get_type() {
		return &#039;singular&#039;;
	}

	public static function get_priority() {
		return 40;
	}

	public function __construct( $data ) {
		$this-&gt;post_type = get_post_type_object( $data[&#039;post_type&#039;] );
		$taxonomies = get_object_taxonomies( $data[&#039;post_type&#039;], &#039;objects&#039; );
		$this-&gt;post_taxonomies = wp_filter_object_list( $taxonomies, [
			&#039;public&#039; =&gt; true,
			&#039;show_in_nav_menus&#039; =&gt; true,
		] );

		parent::__construct();
	}

	public function get_name() {
		return $this-&gt;post_type-&gt;name;
	}

	public function get_label() {
		return $this-&gt;post_type-&gt;labels-&gt;singular_name;
	}

	public function get_all_label() {
		return $this-&gt;post_type-&gt;label;
	}

	public function check( $args ) {
		if ( isset( $args[&#039;id&#039;] ) ) {
			$id = (int) $args[&#039;id&#039;];
			if ( $id ) {
				return is_singular() &amp;&amp; get_queried_object_id() === $id;
			}
		}

		return is_singular( $this-&gt;post_type-&gt;name );
	}

	public function register_sub_conditions() {
		foreach ( $this-&gt;post_taxonomies as $slug =&gt; $object ) {
			$in_taxonomy = new In_Taxonomy( [
				&#039;object&#039; =&gt; $object,
			] );
			$this-&gt;register_sub_condition( $in_taxonomy );

			if ( $object-&gt;hierarchical ) {
				$in_sub_term = new In_Sub_Term( [
					&#039;object&#039; =&gt; $object,
				] );
				$this-&gt;register_sub_condition( $in_sub_term );
			}
		}

		$by_author = new Post_Type_By_Author( $this-&gt;post_type );
		$this-&gt;register_sub_condition( $by_author );

	}

	protected function register_controls() {
		$this-&gt;add_control(
			&#039;post_id&#039;,
			[
				&#039;section&#039; =&gt; &#039;settings&#039;,
				&#039;type&#039; =&gt; QueryModule::QUERY_CONTROL_ID,
				&#039;select2options&#039; =&gt; [
					&#039;dropdownCssClass&#039; =&gt; &#039;elementor-conditions-select2-dropdown&#039;,
				],
				&#039;autocomplete&#039; =&gt; [
					&#039;object&#039; =&gt; QueryModule::QUERY_OBJECT_POST,
					&#039;query&#039; =&gt; [
						&#039;post_type&#039; =&gt; $this-&gt;get_name(),
					],
				],
			]
		);
	}
}
</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>
