Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
function deactivate_license() { $license = trim(get_option($this->theme_slug..
Decoded Output download
<? function deactivate_license()
{
$license = trim(get_option($this->theme_slug . "_license_key"));
$api_params = array("edd_action" => "deactivate_license", "license" => $license, "item_name" => urlencode($this->item_name), "url" => home_url("/"));
$response = $this->get_api_response($api_params);
if (is_wp_error($response) || 200 !== wp_remote_retrieve_response_code($response)) {
if (is_wp_error($response)) {
$message = $response->get_error_message();
} else {
$message = __("An error occurred, please try again.", TEXT_DOMAIN);
}
} else {
$license_data = json_decode(wp_remote_retrieve_body($response));
if ($license_data && $license_data->license == "deactivated") {
delete_option($this->theme_slug . "_license_key");
delete_option($this->theme_slug . "_license_key_status");
delete_transient($this->theme_slug . "_license_message");
}
}
if (!empty($message)) {
$base_url = admin_url("themes.php?page=" . $this->theme_slug . '');
$redirect = add_query_arg(array("sl_theme_activation" => "false", "message" => urlencode($message)), $base_url);
wp_redirect($redirect);
die;
}
wp_redirect(admin_url("themes.php?page=" . $this->theme_slug . ''));
die;
} ?>
Did this file decode correctly?
Original Code
function deactivate_license()
{
$license = trim(get_option($this->theme_slug . "\137\x6c\x69\x63\x65\156\163\x65\137\153\145\171"));
$api_params = array("\145\x64\x64\137\141\x63\164\x69\x6f\156" => "\x64\x65\x61\x63\164\151\166\x61\164\x65\x5f\x6c\151\x63\145\x6e\163\x65", "\x6c\151\x63\x65\156\x73\145" => $license, "\151\x74\145\155\x5f\x6e\141\155\145" => urlencode($this->item_name), "\165\162\x6c" => home_url("\x2f"));
$response = $this->get_api_response($api_params);
if (is_wp_error($response) || 200 !== wp_remote_retrieve_response_code($response)) {
if (is_wp_error($response)) {
$message = $response->get_error_message();
} else {
$message = __("\x41\x6e\x20\145\162\x72\157\162\40\x6f\x63\143\165\x72\x72\145\x64\x2c\40\160\x6c\x65\x61\163\x65\x20\x74\x72\x79\40\x61\x67\141\x69\x6e\x2e", TEXT_DOMAIN);
}
} else {
$license_data = json_decode(wp_remote_retrieve_body($response));
if ($license_data && $license_data->license == "\x64\145\141\143\x74\151\x76\x61\164\x65\144") {
delete_option($this->theme_slug . "\x5f\x6c\x69\143\145\156\163\x65\x5f\153\145\171");
delete_option($this->theme_slug . "\x5f\154\151\143\x65\156\163\x65\137\x6b\x65\x79\x5f\163\x74\x61\164\165\x73");
delete_transient($this->theme_slug . "\137\154\x69\x63\145\156\163\145\x5f\155\x65\x73\x73\141\147\145");
}
}
if (!empty($message)) {
$base_url = admin_url("\x74\150\x65\x6d\x65\163\x2e\160\x68\160\77\160\x61\x67\x65\x3d" . $this->theme_slug . '');
$redirect = add_query_arg(array("\163\154\x5f\x74\150\145\x6d\x65\137\x61\143\164\151\166\141\x74\x69\x6f\156" => "\x66\141\x6c\x73\x65", "\x6d\145\x73\163\141\x67\x65" => urlencode($message)), $base_url);
wp_redirect($redirect);
die;
}
wp_redirect(admin_url("\164\x68\x65\155\145\163\56\160\x68\x70\77\x70\x61\x67\x65\x3d" . $this->theme_slug . ''));
die;
}
Function Calls
None |
Stats
MD5 | 632246535f1d12af3b1e308c63d783f2 |
Eval Count | 0 |
Decode Time | 49 ms |