403Webshell
Server IP : 108.167.142.43  /  Your IP : 216.73.217.58
Web Server : Apache
System : Linux gator4174.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64
User : delarice ( 2406)
PHP Version : 8.3.36
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home2/delarice/www/wp-content/plugins/elementor/modules/default-styles/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/delarice/www/wp-content/plugins/elementor/modules/default-styles/atomic-default-styles.php
<?php

namespace Elementor\Modules\DefaultStyles;

use Elementor\Modules\AtomicWidgets\Styles\Atomic_Styles_Manager;
use Elementor\Plugin;

class Atomic_Default_Styles {
	const STYLES_KEY = 'default';

	public function register_hooks() {
		add_action(
			'elementor/atomic-widgets/styles/register',
			fn( Atomic_Styles_Manager $styles_manager ) => $this->register_styles( $styles_manager ),
			15,
			1
		);

		add_action(
			'elementor/default_styles/update',
			fn() => $this->invalidate_cache(),
			10,
			0
		);

		add_action(
			'elementor/core/files/clear_cache',
			fn() => $this->invalidate_cache(),
		);

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

	private function register_styles( Atomic_Styles_Manager $styles_manager ) {
		$styles_manager->register(
			[ self::STYLES_KEY ],
			fn () => $this->get_all_default_styles(),
		);
	}

	private function get_all_default_styles(): array {
		$items = Default_Styles_Repository::make()->all();

		return array_values( $items );
	}

	private function invalidate_cache(): void {
		do_action( 'elementor/atomic-widgets/styles/clear', [ self::STYLES_KEY ] );
	}

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

		$this->invalidate_cache();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit