Plugin Directory

Changeset 564351


Ignore:
Timestamp:
06/27/2012 12:52:00 AM (14 years ago)
Author:
kyleabaker
Message:

v0.10.15 = in-progress

  • Added detection for Atomic Web Browser.
  • Fixed issue where the Links browser was incorrectly detected for the UA "online link validator (http://www.dead-links.com/)" and cause a warning to appear.
  • Added detection for Windows 8.
  • Added detection for the Wordpress App for BlackBerry, Windows Phone, Nokia, WebOS.
Location:
wp-useragent/trunk
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-useragent/trunk/readme.txt

    r543904 r564351  
    55Requires at least: 2.0
    66Tested up to: 3.4
    7 Stable tag: 0.10.14
     7Stable tag: 0.10.15
    88
    99== Description ==
     
    6666
    6767== Changelog ==
     68
     69= v0.10.15 = //in-progress
     70* Added detection for Atomic Web Browser.
     71* Fixed issue where the Links browser was incorrectly detected for the UA "online link validator (http://www.dead-links.com/)" and cause a warning to appear.
     72* Added detection for Windows 8.
     73* Added detection for the Wordpress App for BlackBerry, Windows Phone, Nokia, WebOS.
     74
    6875
    6976= v0.10.14 =
     
    549556== Upgrade Notice ==
    550557
    551 = v0.10.14 =
    552 * Added detection for Crunchbang, Mageia, Pardus and Rosa Linux (props: KZKG^Gaara)
    553 * Fixed detection of SRWare Iron browser (props: KZKG^Gaara)
     558= v0.10.15 =
     559* Added detection for Atomic Web Browser.
     560* Fixed issue where the Links browser was incorrectly detected for the UA "online link validator (http://www.dead-links.com/)" and cause a warning to appear.
     561* Added detection for Windows 8.
     562* Added detection for the Wordpress App for BlackBerry, Windows Phone, Nokia, WebOS.
  • wp-useragent/trunk/wp-useragent.php

    r543904 r564351  
    44Plugin URI: http://kyleabaker.com/goodies/coding/wp-useragent/
    55Description: A simple User-Agent detection plugin that lets you easily insert icons and/or textual web browser and operating system details with each comment.
    6 Version: 0.10.14
     6Version: 0.10.15
    77Author: Kyle Baker
    88Author URI: http://kyleabaker.com/
     
    123123    elseif(strtolower($title)=="wp-android" || strtolower($title)=="wp-iphone")
    124124        return "Wordpress App ".$version;
     125    elseif(strtolower($title)=="atomicbrowser")
     126        return "Atomic Web Browser ".$version;
    125127    elseif(strtolower($title)=="opera labs")
    126128    {
     
    176178        $title=detect_browser_version("Arora");
    177179        $code="arora";
     180    }elseif(preg_match('/AtomicBrowser/i', $useragent)){
     181        $link="http://www.atomicwebbrowser.com/";
     182        $title=detect_browser_version("AtomicBrowser");
     183        $code="atomicwebbrowser";
    178184    }elseif(preg_match('/Avant\ Browser/i', $useragent)){
    179185        $link="http://www.avantbrowser.com/";
     
    544550        $title="LeechCraft";
    545551        $code="null";
    546     }elseif(preg_match('/Links/i', $useragent)){
     552    }elseif(preg_match('/Links/i', $useragent) && !preg_match('/online\ link\ validator/i', $useragent)){
    547553        $link="http://links.sourceforge.net/";
    548554        $title=detect_browser_version("Links");
     
    10061012        $title=detect_browser_version("wp-android");
    10071013        $code="wordpress";
     1014    }elseif(preg_match('/wp-blackberry/i', $useragent)){
     1015        $link="http://blackberry.wordpress.org/";
     1016        $title=detect_browser_version("wp-blackberry");
     1017        $code="wordpress";
    10081018    }elseif(preg_match('/wp-iphone/i', $useragent)){
    10091019        $link="http://ios.wordpress.org/";
    10101020        $title=detect_browser_version("wp-iphone");
     1021        $code="wordpress";
     1022    }elseif(preg_match('/wp-nokia/i', $useragent)){
     1023        $link="http://nokia.wordpress.org/";
     1024        $title=detect_browser_version("wp-nokia");
     1025        $code="wordpress";
     1026    }elseif(preg_match('/wp-webos/i', $useragent)){
     1027        $link="http://webos.wordpress.org/";
     1028        $title=detect_browser_version("wp-webos");
     1029        $code="wordpress";
     1030    }elseif(preg_match('/wp-windowsphone/i', $useragent)){
     1031        $link="http://windowsphone.wordpress.org/";
     1032        $title=detect_browser_version("wp-windowsphone");
    10111033        $code="wordpress";
    10121034    }elseif(preg_match('/Wyzo/i', $useragent)){
     
    12801302        $code="nokia";
    12811303    }elseif(preg_match('/S(eries)?60/i', $useragent)){
    1282         $link="http://www.s60.com";
     1304        $link="http://www.s60.com/";
    12831305        $title="Nokia Series60";
    12841306        $code="nokia";
     
    13001322        $code="palm";
    13011323    }elseif(preg_match('/Palm/i', $useragent)){
     1324        $link="http://www.palm.com/";
     1325        $title="Palm";
     1326        $code="palm";
     1327    }elseif(preg_match('/wp-webos/i', $useragent)){
    13021328        $link="http://www.palm.com/";
    13031329        $title="Palm";
     
    13451371        }
    13461372        $code="sonyericsson";
     1373
     1374    //Windows Phone
     1375    }elseif(preg_match('/wp-windowsphone/i', $useragent)){
     1376        $link="http://www.windowsphone.com/";
     1377        $title="Windows Phone";
     1378        $code="windowsphone";
    13471379
    13481380    //No Device match
     
    17181750    }elseif(preg_match('/Windows/i', $useragent) || preg_match('/WinNT/i', $useragent) || preg_match('/Win32/i', $useragent)){
    17191751        $link="http://www.microsoft.com/windows/";
    1720         if(preg_match('/Windows NT 6.1; Win64; x64;/i', $useragent) || preg_match('/Windows NT 6.1; WOW64/i', $useragent)){
     1752        if(preg_match('/Windows NT 6.2; Win64; x64;/i', $useragent) || preg_match('/Windows NT 6.2; WOW64/i', $useragent)){
     1753            $title="Windows 8 x64 Edition";
     1754            $code="win-5";
     1755        }elseif(preg_match('/Windows NT 6.2/i', $useragent)){
     1756            $title="Windows 8";
     1757            $code="win-5";
     1758        }elseif(preg_match('/Windows NT 6.1; Win64; x64;/i', $useragent) || preg_match('/Windows NT 6.1; WOW64/i', $useragent)){
    17211759            $title="Windows 7 x64 Edition";
    17221760            $code="win-4";
Note: See TracChangeset for help on using the changeset viewer.