File "updater.php"
Full path: /home/kosmetik/public_html/wp-content/plugins/emage-hover-effects-for-elementor/includes/updater.php
File
size: 1.39 B
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
if (!defined('ABSPATH')) {
exit;
}
require_once EHE_PATH . 'includes/plugin-update-checker/plugin-update-checker.php';
if (!class_exists('Blocksera_Updater')) {
class Blocksera_Updater
{
protected $endpoint = 'https://api.blocksera.com/updates';
public $plugin_path;
public $slug;
public $product_id;
public $code;
public function __construct($plugin_path, $slug, $product_id, $code)
{
$this->plugin_path = $plugin_path;
$this->slug = $slug;
$this->product_id = $product_id;
$this->code = $code;
$this->endpoint = $this->endpoint . '/' . $this->product_id;
$this->checker = Puc_v4_Factory::buildUpdateChecker($this->endpoint, $this->plugin_path, $this->slug);
$this->checker->addQueryArgFilter(function ($queryargs) {
$queryargs = array_merge($queryargs, array('code' => $this->code, 'remove' => 'false', 'site' => get_site_url()));
return $queryargs;
});
}
public function request_info($params)
{
$this->checker->addQueryArgFilter(function ($queryargs) use($params) {
$queryargs = array_merge($queryargs, $params);
return $queryargs;
});
$response = $this->checker->requestInfo();
return $response;
}
}
}