yit_ie_version

Retrieve IE version.

Description

(int|float) yit_ie_version(); 

Returns (int|float)


Usage

  1. if ( !function_exists( 'yit_ie_version' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yith-woocommerce-wishlist/plugin-fw/yit-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = yit_ie_version(); 
  7.  

Defined (1)

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

/plugin-fw/yit-functions.php  
  1. function yit_ie_version() { 
  2.  
  3. if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { 
  4. return - 1; 
  5. preg_match( '/MSIE ([0-9]+\.[0-9])/', $_SERVER['HTTP_USER_AGENT'], $reg ); 
  6.  
  7. if ( ! isset( $reg[1] ) ) // IE 11 FIX 
  8. preg_match( '/rv:([0-9]+\.[0-9])/', $_SERVER['HTTP_USER_AGENT'], $reg ); 
  9. if ( ! isset( $reg[1] ) ) { 
  10. return - 1; 
  11. else { 
  12. return floatval( $reg[1] ); 
  13. else { 
  14. return floatval( $reg[1] );