Completed
Push — add/jetpack-mobile-package ( d1f5cd )
by
unknown
07:53
created

class.jetpack-user-agent.php ➔ jetpack_is_mobile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Automattic\Jetpack\Mobile;
4
5
/**
6
 * Determine if the current User Agent matches the passed $kind
7
 *
8
 * @param string $kind Category of mobile device to check for.
9
 *                         Either: any, dumb, smart.
10
 * @param bool   $return_matched_agent Boolean indicating if the UA should be returned
11
 *
12
 * @return bool|string Boolean indicating if current UA matches $kind. If
13
 *                              $return_matched_agent is true, returns the UA string
14
 */
15
function jetpack_is_mobile( $kind = 'any', $return_matched_agent = false ) {
16
	return Mobile::is_mobile( $kind, $return_matched_agent );
17
}
18