jetpack_check_mobile

The Jetpack by WordPress.com jetpack check mobile function.

Description

jetpack_check_mobile(); 

Usage

  1. if ( !function_exists( 'jetpack_check_mobile' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/minileven/minileven.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_check_mobile(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/minileven/minileven.php  
  1. function jetpack_check_mobile() { 
  2. if ( ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) || ( defined('APP_REQUEST') && APP_REQUEST ) ) 
  3. return false; 
  4. if ( !isset($_SERVER["HTTP_USER_AGENT"]) || (isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'false') ) 
  5. return false; 
  6. return false; 
  7. if ( 1 == get_option('wp_mobile_disable') ) 
  8. return false; 
  9. if ( isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'true' ) 
  10. return true; 
  11.  
  12. $is_mobile = jetpack_is_mobile(); 
  13.  
  14. /** 
  15. * Filter the Mobile check results. 
  16. * @module minileven 
  17. * @since 1.8.0 
  18. * @param bool $is_mobile Is the reader on a mobile device. 
  19. */ 
  20. return apply_filters( 'jetpack_check_mobile', $is_mobile );