Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/www/wp-content/plugins/elementor/modules/global-classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/www/wp-content/plugins/elementor/modules/global-classes/global-classes-css.php
<?php

namespace Elementor\Modules\GlobalClasses;

use Elementor\Plugin;

class Global_Classes_CSS {
	public function register_hooks() {
		add_action(
			'elementor/frontend/after_enqueue_styles',
			fn() => $this->enqueue_styles()
		);

		add_action(
			'elementor/global_classes/update',
			fn( $context ) => $this->clear_css_cache( $context )
		);

		add_action(
			'elementor/core/files/clear_cache',
			fn() => $this->clear_css_cache( Global_Classes_Repository::CONTEXT_FRONTEND )
		);

		add_action(
			'deleted_post',
			fn( $post_id ) => $this->on_post_delete( $post_id )
		);

		add_action(
			'elementor/core/files/after_generate_css',
			fn() => $this->generate_styles()
		);
	}

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

		$css_file->enqueue();
	}

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

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

		$this->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 ) )->delete();

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

Spamworldpro Mini