Let your followers know that you use Pagelayer to build your website :
Pagelayer v'.PAGELAYER_VERSION.'. You can report any bugs here.
';
}
// The License Page
function pagelayer_license(){
global $pl_error;
if(!empty($_REQUEST['install_pro'])){
pagelayer_install_pro();
return;
}
// Is there a license key ?
if(isset($_POST['save_pl_license'])){
$license = pagelayer_optpost('pagelayer_license');
// Check if its a valid license
if(empty($license)){
$pl_error['lic_invalid'] = __('The license key was not submitted', 'pagelayer');
return pagelayer_license_T();
}
$resp = wp_remote_get(PAGELAYER_API.'license.php?license='.$license, array('timeout' => 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'). '
';
}
// If the license is active and you are the free version, then suggest to install the pro
if(!empty($pagelayer->license['status']) && !defined('PAGELAYER_PRO') && empty($_REQUEST['install_pro'])){
echo '
'. __('You have activated the license, but are using the Free version ! Install Pro Now', 'pagelayer'). '