Plugin Directory

Changeset 426533


Ignore:
Timestamp:
08/20/2011 09:01:06 PM (15 years ago)
Author:
kyleabaker
Message:

v0.10.9

  • Fixed Mac OS X version detection so its more flexible.
  • Fixed icon used for Red Hat linux (props: Third Eye)
Location:
wp-useragent/trunk
Files:
2 added
2 edited

Legend:

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

    r383859 r426533  
    55Requires at least: 2.0
    66Tested up to: 3.2
    7 Stable tag: 0.10.8
     7Stable tag: 0.10.9
    88
    99== Description ==
     
    6666
    6767== Changelog ==
     68
     69= v0.10.9 =
     70* Fixed Mac OS X version detection so its more flexible.
     71* Fixed icon used for Red Hat linux (props: Third Eye)
     72
    6873
    6974= v0.10.8 =
  • wp-useragent/trunk/wp-useragent.php

    r383859 r426533  
    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.8
     6Version: 0.10.9
    77Author: Kyle Baker
    88Author URI: http://kyleabaker.com/
     
    13391339        if(preg_match('/Mac OS X/i', $useragent)){
    13401340            $title=substr($useragent, strpos(strtolower($useragent), strtolower("Mac OS X")));
    1341             $title=substr($title, 0, strpos($title, ";"));
    1342             $title=str_replace("_", ".", $title);
     1341            $title=substr($title, 0, strpos($title, ")"));
     1342            if (strpos($title, ";"))
     1343                $title=substr($title, 0, strpos($title, ";"));
     1344            $title=str_replace("_", ".", $title);
    13431345            $code="mac-3";
    13441346        }elseif(preg_match('/Mac OSX/i', $useragent)){
    1345             $title=substr($useragent, strpos(strtolower($useragent), strtolower("Mac OSX")));
    1346             $title=substr($title, 0, strpos($title, ";"));
    1347             $title=str_replace("_", ".", $title);
     1347            $title=substr($useragent, strpos(strtolower($useragent), strtolower("Mac OS X")));
     1348            $title=substr($title, 0, strpos($title, ")"));
     1349            if (strpos($title, ";"))
     1350                $title=substr($title, 0, strpos($title, ";"));
     1351            $title=str_replace("_", ".", $title);
    13481352            $code="mac-2";
    13491353        }elseif(preg_match('/Darwin/i', $useragent)){
     
    13971401        if(preg_match('/.el([._0-9a-zA-Z]+)/i', $useragent, $regmatch))
    13981402            $title.=" Enterprise Linux ".str_replace("_", ".", $regmatch[1]);
    1399         $code="mandriva";
     1403        $code="red-hat";
    14001404    }elseif(preg_match('/Sabayon/i', $useragent)){
    14011405        $link="http://www.sabayonlinux.org/";
Note: See TracChangeset for help on using the changeset viewer.