Plugin Directory

Changeset 1155606


Ignore:
Timestamp:
05/07/2015 07:33:52 PM (11 years ago)
Author:
websitezcom
Message:

Adding the token authorization

Location:
wp-mobile-detector
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-mobile-detector/tags/3.0/functions.php

    r1155575 r1155606  
    662662
    663663/*
     664Check to make sure authorization token is set.
     665*/
     666function websitez_authorization(){
     667    $token = get_option(WEBSITEZ_PLUGIN_AUTHORIZATION);
     668    if(!$token){
     669        $response = unserialize(websitez_remote_request("http://stats.websitez.com/get_token.php","host=".$_SERVER['HTTP_HOST']."&email=".get_option('admin_email')."&source=wp-mobile-detector"));
     670        if($response && $response['status'] == "1" && strlen($response['token']) > 0){
     671            update_option(WEBSITEZ_PLUGIN_AUTHORIZATION,$response['token']);
     672        }
     673    }
     674}
     675
     676/*
    664677Start the buffer to filter the raw contents of a page
    665678*/
     
    910923        add_action('admin_notices', create_function( '', "echo '<div class=\"error\"><p>To finish installing the <strong>WP Mobile Detector</strong>, we need your help. Please <a href=\"admin.php?page=websitez_themes&ftp=true\">click here</a>.</p></div>';" ) );
    911924    endif;
     925    websitez_authorization();
    912926}
    913927
  • wp-mobile-detector/tags/3.0/readme.txt

    r1155575 r1155606  
    11=== WP Mobile Detector ===
    2 Tags: mobile, pda, wireless, cellphone, phone, iphone, touch, webkit, android, blackberry, ipod, mobile phone, ipad, mobile website, BuddyPress
     2Tags: mobile, pda, wireless, cellphone, phone, iphone, touch, webkit, android, blackberry, ipod, mobile phone, smartphone, mobile theme, ipad, mobile website, BuddyPress
    33Contributors: websitezcom
    44Minimum version: 2.7
  • wp-mobile-detector/trunk/functions.php

    r1155575 r1155606  
    662662
    663663/*
     664Check to make sure authorization token is set.
     665*/
     666function websitez_authorization(){
     667    $token = get_option(WEBSITEZ_PLUGIN_AUTHORIZATION);
     668    if(!$token){
     669        $response = unserialize(websitez_remote_request("http://stats.websitez.com/get_token.php","host=".$_SERVER['HTTP_HOST']."&email=".get_option('admin_email')."&source=wp-mobile-detector"));
     670        if($response && $response['status'] == "1" && strlen($response['token']) > 0){
     671            update_option(WEBSITEZ_PLUGIN_AUTHORIZATION,$response['token']);
     672        }
     673    }
     674}
     675
     676/*
    664677Start the buffer to filter the raw contents of a page
    665678*/
     
    910923        add_action('admin_notices', create_function( '', "echo '<div class=\"error\"><p>To finish installing the <strong>WP Mobile Detector</strong>, we need your help. Please <a href=\"admin.php?page=websitez_themes&ftp=true\">click here</a>.</p></div>';" ) );
    911924    endif;
     925    websitez_authorization();
    912926}
    913927
  • wp-mobile-detector/trunk/readme.txt

    r1155575 r1155606  
    11=== WP Mobile Detector ===
    2 Tags: mobile, pda, wireless, cellphone, phone, iphone, touch, webkit, android, blackberry, ipod, mobile phone, ipad, mobile website, BuddyPress
     2Tags: mobile, pda, wireless, cellphone, phone, iphone, touch, webkit, android, blackberry, ipod, mobile phone, smartphone, mobile theme, ipad, mobile website, BuddyPress
    33Contributors: websitezcom
    44Minimum version: 2.7
Note: See TracChangeset for help on using the changeset viewer.