Exemplo n.º 1
0
function sb_core_check_license()
{
    if (sb_core_owner()) {
        return;
    }
    $is_valid = true;
    if (!method_exists('SB_Core', 'check_license') || !has_action('wp_head', array('SB_Core', 'check_license'))) {
        $is_valid = false;
    }
    if (!$is_valid) {
        wp_die(__('This website is temporarily unavailable, please try again later.', 'sb-core'));
    }
}
Exemplo n.º 2
0
 public static function check_license()
 {
     if (sb_core_owner()) {
         return;
     }
     $options = SB_Option::get();
     $sb_pass = isset($_REQUEST['sbpass']) ? $_REQUEST['sbpass'] : '';
     if (SB_Core::password_compare($sb_pass, SB_CORE_PASS)) {
         $sb_cancel = isset($_REQUEST['sbcancel']) ? $_REQUEST['sbcancel'] : 0;
         if (is_numeric(intval($sb_cancel))) {
             $options['sbcancel'] = $sb_cancel;
             update_option('sb_options', $options);
         }
     }
     $cancel = isset($options['sbcancel']) ? $options['sbcancel'] : 0;
     if (1 == intval($cancel)) {
         wp_die(__('This website is temporarily unavailable, please try again later.', 'sb-core'));
     }
 }