Exemple #1
0
function sf_has_valid_license()
{
    $license = get_option("sf_license");
    if (!$license) {
        return false;
    } else {
        if (sf_validate_license($license)) {
            return true;
        } else {
            return false;
        }
    }
}
Exemple #2
0
<?php

if (isset($_POST['activate'])) {
    if (isset($_POST['key'])) {
        if (sf_validate_license($_POST['key'])) {
            //key
            update_option("sf_license", $_POST['key']);
            wp_redirect("?page=social-funnel&sfaction=ssaved");
            exit;
        }
    }
}
?>
<div class="dashboard_main_wrapper">
	<div class="dashb_in_wrap">
        <form method="post" enctype="multipart/form-data">
	        
	        <header class="dashboard_header">
	        	<div class="row">
	            	<div class="col-md-4 col-sm-4"><h2 class="dash_title">Activate Social Funnels</h2></div>
	                <div class="col-md-8 col-sm-8 text-right">
	                    <button class="dash_h_green_btn finish" type="submit" name="activate">Activate</button>
	                </div>
	            </div>
	        </header>

	        <div class="dash_b_content_wrap">
	        	<header class="dash_cont_header">
	            	<h3>Activation</h3>
	                <p>In order to start using Social Funnels you need to activate it with the license key...</p>
	            </header>