Change elementor
This commit is contained in:
@@ -44,7 +44,7 @@ $_config->cloud_response = [
|
|||||||
'success' => true,
|
'success' => true,
|
||||||
'license' => 'valid',
|
'license' => 'valid',
|
||||||
'status' => 'valid',
|
'status' => 'valid',
|
||||||
'expires' => '10.10.2030',
|
'expires' => '10.10.2050',
|
||||||
'tier' => 'agency',
|
'tier' => 'agency',
|
||||||
'features' => [
|
'features' => [
|
||||||
'custom-attributes','custom_code','custom-css','global-css','display-conditions',
|
'custom-attributes','custom_code','custom-css','global-css','display-conditions',
|
||||||
@@ -58,8 +58,6 @@ $_config->cloud_response = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
$_config->lic_response = $_config->cloud_response;
|
$_config->lic_response = $_config->cloud_response;
|
||||||
$_config->api = "https://my.{$_config->name}.com/api";
|
|
||||||
$_config->templates = "http://{$_config->wpn}.org/{$_config->name}/templates";
|
|
||||||
$_config->lic_data = ['timeout' => $_config->timeout, 'value' => json_encode($_config->lic_response)];
|
$_config->lic_data = ['timeout' => $_config->timeout, 'value' => json_encode($_config->lic_response)];
|
||||||
|
|
||||||
// Sync data
|
// Sync data
|
||||||
@@ -73,28 +71,6 @@ $m['u']("_{$_config->name}{$_config->pro}license_v2_data", $_config->lic_data);
|
|||||||
|
|
||||||
add_filter("{$_config->name}/connect/additional-connect-info", '__return_empty_array', 999);
|
add_filter("{$_config->name}/connect/additional-connect-info", '__return_empty_array', 999);
|
||||||
|
|
||||||
// Network intercept
|
|
||||||
add_action('plugins_loaded', function () use ($m, $_config) {
|
|
||||||
$m['a']($m['h'], function ($pre, $parsed_args, $url) use ($_config) {
|
|
||||||
|
|
||||||
// Target API
|
|
||||||
if (strpos($url, "{$_config->api}/v2/lic") !== false) {
|
|
||||||
return [
|
|
||||||
'response' => ['code' => 200, 'message' => 'OK'],
|
|
||||||
'body' => json_encode($_config->cloud_response)
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Target Assets
|
|
||||||
if (strpos($url, "/connect/v1/library/get_template_content") !== false) {
|
|
||||||
$res = wp_remote_get("{$_config->templates}/{$parsed_args['body']['id']}.json", ['sslverify' => false, 'timeout' => 25]);
|
|
||||||
return (wp_remote_retrieve_response_code($res) == 200) ? $res : $pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $pre;
|
|
||||||
}, 10, 3);
|
|
||||||
});
|
|
||||||
|
|
||||||
// UI Fix
|
// UI Fix
|
||||||
add_action('admin_enqueue_scripts', function () {
|
add_action('admin_enqueue_scripts', function () {
|
||||||
$screen = get_current_screen();
|
$screen = get_current_screen();
|
||||||
|
|||||||
Reference in New Issue
Block a user