Changeset 564351
- Timestamp:
- 06/27/2012 12:52:00 AM (14 years ago)
- Location:
- wp-useragent/trunk
- Files:
-
- 6 added
- 2 edited
-
img/16/device/windowsphone.png (added)
-
img/16/net/atomicwebbrowser.png (added)
-
img/16/os/win-5.png (added)
-
img/24/device/windowsphone.png (added)
-
img/24/net/atomicwebbrowser.png (added)
-
img/24/os/win-5.png (added)
-
readme.txt (modified) (3 diffs)
-
wp-useragent.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-useragent/trunk/readme.txt
r543904 r564351 5 5 Requires at least: 2.0 6 6 Tested up to: 3.4 7 Stable tag: 0.10.1 47 Stable tag: 0.10.15 8 8 9 9 == Description == … … 66 66 67 67 == 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 68 75 69 76 = v0.10.14 = … … 549 556 == Upgrade Notice == 550 557 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 4 4 Plugin URI: http://kyleabaker.com/goodies/coding/wp-useragent/ 5 5 Description: 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.1 46 Version: 0.10.15 7 7 Author: Kyle Baker 8 8 Author URI: http://kyleabaker.com/ … … 123 123 elseif(strtolower($title)=="wp-android" || strtolower($title)=="wp-iphone") 124 124 return "Wordpress App ".$version; 125 elseif(strtolower($title)=="atomicbrowser") 126 return "Atomic Web Browser ".$version; 125 127 elseif(strtolower($title)=="opera labs") 126 128 { … … 176 178 $title=detect_browser_version("Arora"); 177 179 $code="arora"; 180 }elseif(preg_match('/AtomicBrowser/i', $useragent)){ 181 $link="http://www.atomicwebbrowser.com/"; 182 $title=detect_browser_version("AtomicBrowser"); 183 $code="atomicwebbrowser"; 178 184 }elseif(preg_match('/Avant\ Browser/i', $useragent)){ 179 185 $link="http://www.avantbrowser.com/"; … … 544 550 $title="LeechCraft"; 545 551 $code="null"; 546 }elseif(preg_match('/Links/i', $useragent) ){552 }elseif(preg_match('/Links/i', $useragent) && !preg_match('/online\ link\ validator/i', $useragent)){ 547 553 $link="http://links.sourceforge.net/"; 548 554 $title=detect_browser_version("Links"); … … 1006 1012 $title=detect_browser_version("wp-android"); 1007 1013 $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"; 1008 1018 }elseif(preg_match('/wp-iphone/i', $useragent)){ 1009 1019 $link="http://ios.wordpress.org/"; 1010 1020 $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"); 1011 1033 $code="wordpress"; 1012 1034 }elseif(preg_match('/Wyzo/i', $useragent)){ … … 1280 1302 $code="nokia"; 1281 1303 }elseif(preg_match('/S(eries)?60/i', $useragent)){ 1282 $link="http://www.s60.com ";1304 $link="http://www.s60.com/"; 1283 1305 $title="Nokia Series60"; 1284 1306 $code="nokia"; … … 1300 1322 $code="palm"; 1301 1323 }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)){ 1302 1328 $link="http://www.palm.com/"; 1303 1329 $title="Palm"; … … 1345 1371 } 1346 1372 $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"; 1347 1379 1348 1380 //No Device match … … 1718 1750 }elseif(preg_match('/Windows/i', $useragent) || preg_match('/WinNT/i', $useragent) || preg_match('/Win32/i', $useragent)){ 1719 1751 $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)){ 1721 1759 $title="Windows 7 x64 Edition"; 1722 1760 $code="win-4";
Note: See TracChangeset
for help on using the changeset viewer.