Exemplo n.º 1
0
function wptouch_admin_check_api()
{
    require_once WPTOUCH_DIR . '/core/bncid.php';
    wptouch_check_api();
}
 function admin_nopriv_ajax_handler()
 {
     if ($this->post['wptouch_action'] == 'post_upgrade_refresh') {
         $wptouch_nonce = $this->post['wptouch_ajax_nonce'];
         if (wp_verify_nonce($wptouch_nonce, 'wptouch_ajax_callback')) {
             wptouch_check_api(true);
             delete_site_transient('wptouch_license_upgrade_available');
             die('1');
         } else {
             die('Invalid nonce');
         }
     }
 }
 function process_submitted_settings($update_info = false)
 {
     $old_settings = wptouch_get_settings();
     if ('POST' != $_SERVER['REQUEST_METHOD']) {
         return;
     }
     require_once WPTOUCH_DIR . '/core/admin-settings.php';
     wptouch_settings_process($this);
     $this->delete_theme_add_on_cache();
     $new_settings = wptouch_get_settings();
     if (!$old_settings->add_referral_code && $new_settings->add_referral_code) {
         $bnc_settings = wptouch_get_settings('bncid');
         $bnc_settings->next_update_check_time = 0;
         $bnc_settings->save();
         $this->setup_bncapi();
         wptouch_check_api();
     }
     if (function_exists('wptouch_pro_update_site_info') && $update_info) {
         wptouch_pro_update_site_info();
     }
 }
Exemplo n.º 4
0
function wptouch_has_license()
{
    wptouch_check_api();
    $bnc_settings = wptouch_get_settings('bncid');
    return $bnc_settings->license_accepted;
}
Exemplo n.º 5
0
<?php

$settings = wptouch_get_settings('bncid');
?>

<?php 
if (!defined('WPTOUCH_IS_FREE')) {
    wptouch_check_api(true);
    $bncid_info = wptouch_get_settings('bncid');
}
?>

<?php 
function wptouch_has_valid_gravatar($email)
{
    // Check to see if an e-mail address has a Gravatar associated with it
    // Craft a potential url and test its headers
    $hash = md5(strtolower(trim($email)));
    $uri = 'http://www.gravatar.com/avatar/' . $hash . '?d=404';
    $headers = @get_headers($uri);
    if (!preg_match("|200|", $headers[0])) {
        $has_valid_avatar = false;
    } else {
        $has_valid_avatar = true;
    }
    return $has_valid_avatar;
}
?>

<script type="text/javascript">
	var bncHasLicense = 0;