403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.154
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/yme/wp-content/plugins/simply-static/src/integrations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/yme/wp-content/plugins/simply-static/src/integrations/class-cookie-yes-integration.php
<?php

namespace Simply_Static;

use voku\helper\SimpleHtmlDom;

class CookieYes_Integration extends Integration {

	/**
	 * Given plugin handler ID.
	 *
	 * @var string Handler ID.
	 */
	protected $id = 'cookieyes';

	public function __construct() {
		$this->name = __( 'CookieYes | GDPR Cookie Consent', 'simply-static' );
		$this->description = __( 'Fixes scripts given by CookieYes to work on exported pages.', 'simply-static' );
	}

	/**
	 * Return if the dependency is active.
	 *
	 * @return boolean
	 */
	public function dependency_active() {
		return defined( 'CKY_APP_URL' );
	}

	/**
	 * Run the integration.
	 *
	 * @return void
	 */
	public function run() {
		add_action( 'ss_after_extract_and_replace_urls_in_html', [ $this, 'fix_cookieyes_template' ] );
	}

	/**
	 * @param SimpleHtmlDom $dom
	 *
	 * @return void
	 */
	public function fix_cookieyes_template( $dom ) {
		$tags = $dom->find( 'script' );

		foreach ( $tags as $tag ) {
			if ( 'ckyBannerTemplate' !== $tag->getAttribute( 'id' ) ) {
				continue;
			}

			$tag->innerhtmlKeep = preg_replace( '/<\\\/i', '<', $tag->innerhtmlKeep );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit