403Webshell
Server IP : 87.98.154.146  /  Your IP : 216.73.216.165
Web Server : Apache
System : Linux webm004.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : ohklomafyi ( 52085)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/ohklomafyi/www/wp-content/plugins/shortpixel-image-optimiser/class/external/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ohklomafyi/www/wp-content/plugins/shortpixel-image-optimiser/class/external/pantheon.php
<?php
namespace ShortPixel;

if ( ! defined( 'ABSPATH' ) ) {
 exit; // Exit if accessed directly.
}

class Pantheon {

	public static $is_pantheon = false;

	public function __construct()
	{
		add_action( 'shortpixel/image/optimised', array( $this, 'flush_image_caches' ), 10 );
		if (! defined('SHORTPIXEL_TRUSTED_MODE'))
		{
			 define('SHORTPIXEL_TRUSTED_MODE', true);
		}

		self::$is_pantheon = true;
	}

	public static function IsActive()
	{
		 return self::$is_pantheon;
	}

	public function flush_image_caches( $imageItem )
	{

    $image_paths[] = $imageItem->getURL();

		if ($imageItem->hasOriginal())
		{
			 $image_paths[] = $imageItem->getOriginalFile()->getURL();
		}

    if (count($imageItem->get('thumbnails')) > 0)
    {
       foreach($imageItem->get('thumbnails') as $thumbObj)
       {
           $image_paths[] = $thumbObj->getURL();
       }
    }

    $domain      = get_site_url();
    $image_paths = array_map(function($path) use ($domain)
    {
       return str_replace( $domain, '', $path);
    },$image_paths);

		if ( ! empty( $image_paths ) ) {
			$image_paths = array_unique( $image_paths );
			if ( function_exists( 'pantheon_wp_clear_edge_paths' ) ) {
				// Do the flush
				pantheon_wp_clear_edge_paths( $image_paths );
			}
		}
  }
} // class

if ( ! empty( $_ENV['PANTHEON_ENVIRONMENT'] ) ) {
	$p = new Pantheon();  // monitor hook.
}

Youez - 2016 - github.com/yon3zu
LinuXploit