Automattic\WPSC\Device_Detection
User_Agent_Info::is_tablet
Detects if the user is using a tablet. props Corey Gilmore, BGR.com
Method of the class: User_Agent_Info{}
No Hooks.
Returns
true|false.
Usage
$User_Agent_Info = new User_Agent_Info(); $User_Agent_Info->is_tablet();
User_Agent_Info::is_tablet() User Agent Info::is tablet code WPSCache 3.1.0
public function is_tablet() {
$ua = $this->useragent;
return ( 0 // Never true, but makes it easier to manage our list of tablet conditions.
|| self::is_ipad( $ua )
|| self::is_android_tablet( $ua )
|| self::is_blackberry_tablet( $ua )
|| self::is_kindle_fire( $ua )
|| self::is_MaemoTablet( $ua )
|| self::is_TouchPad( $ua )
);
}