30));
if(is_array($resp)){
$json = json_decode($resp['body'], true);
//print_r($json);
}else{
$pl_error['resp_invalid'] = __('The response was malformed
'.var_export($resp, true), 'pagelayer');
return pagelayer_license_T();
}
// Save the License
if(empty($json['license'])){
$pl_error['lic_invalid'] = __('The license key is invalid', 'pagelayer');
return pagelayer_license_T();
}else{
update_option('pagelayer_license', $json);
// Load license
pagelayer_load_license();
// Mark as saved
$GLOBALS['pl_saved'] = true;
}
}
pagelayer_license_T();
}
// The License Page - THEME
function pagelayer_license_T(){
global $pagelayer, $pl_error;
pagelayer_page_header('Pagelayer License');
// Saved ?
if(!empty($GLOBALS['pl_saved'])){
echo '
'. __('The settings were saved successfully', 'pagelayer'). '
'. __('You have activated the license, but are using the Free version ! Install Pro Now', 'pagelayer'). '
Promotional Offer : If you buy Pagelayer Pro before 31st March, 2020 then you will get an additional year free and your license will expire on 31st March, 2022