HEX
Server: LiteSpeed
System: Linux melbournecleaninggroup 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: www-data (33)
PHP: 7.3.33-1+focal
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/wp-content/plugins/brizy/editor/compiled-html.php
<?php if ( ! defined( 'ABSPATH' ) ) {
	die( 'Direct access forbidden.' );
}

class Brizy_Editor_CompiledHtml {

	/**
	 * @var Brizy_Editor_Helper_Dom
	 */
	private $dom;

	/**
	 * @var Brizy_Editor_Content_ProcessorInterface[]
	 */
	private $processors = array();

	/**
	 * Brizy_Editor_CompiledHtml constructor.
	 *
	 * @param $html
	 */
	public function __construct( $html ) {
		$this->dom = new Brizy_Editor_Helper_Dom( $html );
	}

	/**
	 * @param Brizy_Editor_Content_ProcessorInterface[] $processors
	 */
	public function setProcessors( $processors ) {
		$this->processors = $processors;
	}

	/**
	 * @param Brizy_Editor_Asset_ProcessorInterface $asset_processor
	 */
	public function addAssetProcessor( $asset_processor ) {
		$this->asset_processors[] = $asset_processor;
	}


	/**
	 * @return string
	 */
	public function get_body() {

		$body_tag = $this->dom->get_body();

		$content = $body_tag->get_content();

		$content = $this->apply_processors( $content );

		return $content;
	}

	/**
	 * @param bool $include_parent_tag
	 *
	 * @return string
	 */
	public function get_head( $include_parent_tag = false ) {

		$head_tag = $this->dom->get_head();

		$content = $head_tag->get_content();
		$content = $this->apply_processors( $content );

		return $content;
	}

	private function apply_processors( $content ) {

		$content = html_entity_decode( $content, ENT_QUOTES | ENT_HTML5, get_bloginfo( 'charset' ) );

		$processors = apply_filters( 'brizy_apply_content_processors', $this->processors );

		foreach ( $processors as $processor ) {
			$content = $processor->process( $content );
		}

		return $content;
	}
}