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

namespace Elementor\Modules\GlobalClasses;

use Elementor\Plugin;

class Global_Classes_CSS {
	public function register_hooks() {
		add_action(
			&#039;elementor/frontend/after_enqueue_styles&#039;,
			fn() =&gt; $this-&gt;enqueue_styles()
		);

		add_action(
			&#039;elementor/global_classes/update&#039;,
			fn( $context ) =&gt; $this-&gt;clear_css_cache( $context )
		);

		add_action(
			&#039;elementor/core/files/clear_cache&#039;,
			fn() =&gt; $this-&gt;clear_css_cache( Global_Classes_Repository::CONTEXT_FRONTEND )
		);

		add_action(
			&#039;deleted_post&#039;,
			fn( $post_id ) =&gt; $this-&gt;on_post_delete( $post_id )
		);

		add_action(
			&#039;elementor/core/files/after_generate_css&#039;,
			fn() =&gt; $this-&gt;generate_styles()
		);

		add_filter(&#039;elementor/atomic-widgets/settings/transformers/classes&#039;,
			fn( $value ) =&gt; $this-&gt;transform_classes_names( $value )
		);
	}

	private function enqueue_styles() {
		$css_file = is_preview()
			? new Global_Classes_CSS_Preview()
			: new Global_Classes_CSS_File();

		$css_file-&gt;enqueue();
	}

	private function generate_styles() {
		( new Global_Classes_CSS_File() )-&gt;update();
	}

	private function on_post_delete( $post_id ) {
		if ( ! Plugin::$instance-&gt;kits_manager-&gt;is_kit( $post_id ) ) {
			return;
		}

		$this-&gt;clear_css_cache(
			Global_Classes_Repository::CONTEXT_FRONTEND,
			$post_id
		);
	}

	private function clear_css_cache( string $context, $kit_id = null ): void {
		( new Global_Classes_CSS_Preview( $kit_id ) )-&gt;delete();

		if ( Global_Classes_Repository::CONTEXT_FRONTEND === $context ) {
			( new Global_Classes_CSS_File( $kit_id ) )-&gt;delete();
		}
	}

	private function transform_classes_names( $ids ) {
		$context = is_preview() ? Global_Classes_Repository::CONTEXT_PREVIEW : Global_Classes_Repository::CONTEXT_FRONTEND;

		$classes = Global_Classes_Repository::make()
			-&gt;context( $context )
			-&gt;all()
			-&gt;get_items();

		return array_map(
			function( $id ) use ( $classes ) {
				$class = $classes-&gt;get( $id );

				return $class ? $class[&#039;label&#039;] : $id;
			},
			$ids
		);
	}
}
</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>
