* support and browser details. By having the latest version of Browscap, we can be
* sure we can detect the latest versions of browsers with up-to-date information. * * This function is added as a scheduled event to run every day and check for a new version. * * @param void * @return void * @access private */ function _browscap_check_for_new_browscap() { // Only check remote version number if the browscap version is current if( get_option('_browscap_ver_is_current') ) { // Retrieve the current version number from the browscap website $version = wp_remote_fopen('http://browsers.garykeith.com/versions/version-number.asp'); // Get local browscap version if( version_compare(PHP_VERSION, '5.3.0') >= 0 ) $brows = parse_ini_file(BROWSECAP_FILE, true, INI_SCANNER_RAW); else $brows = parse_ini_file(BROWSECAP_FILE, true); $local_version = $brows['GJK_Browscap_Version']['Version']; $rversion = get_option('browscap_remote_version'); if($version != $local_version) { update_option('_browscap_ver_is_current', 0); update_option('browscap_remote_version', $version); } elseif( $rversion ) update_option('browscap_remote_version', $version); } } add_action('_browscap_check_browscap', '_browscap_check_for_new_browscap');