jetpack_mobile_exclude

The Jetpack by WordPress.com jetpack mobile exclude function.

Description

jetpack_mobile_exclude(); 

Usage

  1. if ( !function_exists( 'jetpack_mobile_exclude' ) ) { 
  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_mobile_exclude(); 
  7.  

Defined (1)

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

/modules/minileven/minileven.php  
  1. function jetpack_mobile_exclude() { 
  2. $exclude = false; 
  3. $pages_to_exclude = array( 
  4. 'wp-admin',  
  5. 'wp-comments-post.php',  
  6. 'wp-mail.php',  
  7. 'wp-login.php',  
  8. 'wp-activate.php',  
  9. ); 
  10. foreach ( $pages_to_exclude as $exclude_page ) { 
  11. if ( strstr( strtolower( $_SERVER['REQUEST_URI'] ), $exclude_page ) ) 
  12. $exclude = true; 
  13.  
  14. if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX
  15. $exclude = false; 
  16.  
  17. if ( isset( $GLOBALS['wp_customize'] ) ) 
  18. return true; 
  19.  
  20. return $exclude;