Plugin Directory

Changeset 378175


Ignore:
Timestamp:
04/28/2011 02:16:28 AM (15 years ago)
Author:
kyleabaker
Message:

v0.10.7

  • Added detection for Kindle.
  • Added detection for moonOS.
Location:
wp-useragent/trunk
Files:
4 added
2 edited

Legend:

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

    r365240 r378175  
    55Requires at least: 2.0
    66Tested up to: 3.2
    7 Stable tag: 0.10.6
     7Stable tag: 0.10.7
    88
    99== Description ==
     
    6666
    6767== Changelog ==
     68
     69= v0.10.7 =
     70* Added detection for Kindle.
     71* Added detection for moonOS.
     72
    6873
    6974= v0.10.6 =
     
    501506== Upgrade Notice ==
    502507
    503 = v0.10.6 =
    504 * Added detection for BlackHawk, Gtk+ WebCore, Tencent Traveler and Vimprobable.
    505 * Added a quick fix for Arch Linux improperly being detected when IE users have SearchToolbar installed (since it improperly matched seARCHtoolbar).
    506 * Added new feature to hide "Unknown" output. This is disabled by default (props: Cahya)
     508= v0.10.7 =
     509* Added detection for Kindle.
     510* Added detection for moonOS.
  • wp-useragent/trunk/wp-useragent.php

    r365240 r378175  
    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.6
     6Version: 0.10.7
    77Author: Kyle Baker
    88Author URI: http://kyleabaker.com/
     
    10601060        $code="htc";
    10611061
     1062    //Kindle
     1063    }elseif(preg_match('/Kindle/i', $useragent)){
     1064        $link="http://en.wikipedia.org/wiki/Amazon_Kindle";
     1065        $title="Kindle";
     1066        if(preg_match('/Kindle\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
     1067            $title.=" ".$regmatch[1];
     1068        $code="kindle";
     1069
    10621070    //LG
    10631071    }elseif(preg_match('/LG/i', $useragent)){
     
    13381346            $title.=" ".$regmatch[1];
    13391347        $code="mandriva";
     1348    }elseif(preg_match('/moonOS/i', $useragent)){
     1349        $link="http://www.moonos.org/";
     1350        $title="moonOS";
     1351        if(preg_match('/moonOS\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
     1352            $title.=" ".$regmatch[1];
     1353        $code="moonos";
    13401354    }elseif(preg_match('/MorphOS/i', $useragent)){
    13411355        $link="http://www.morphos-team.net/";
Note: See TracChangeset for help on using the changeset viewer.