function wpmp_theme_group() { global $wpmp_theme_group; if (!isset($wpmp_theme_group)) { if (get_option('wpmp_theme_nokia_templates') == 'true') { include_once 'group_detection.php'; $wpmp_theme_group = group_detection(); } else { $wpmp_theme_group = ''; } } return $wpmp_theme_group; }
function wpmp_theme_group() { global $wpmp_theme_group; if (!isset($wpmp_theme_group)) { if (get_option('wpmp_theme_nokia_templates') == 'true') { $wp_mobile_pack_dir = WP_CONTENT_DIR . '/plugins/baap-mobile-version'; include_once $wp_mobile_pack_dir . '/themes/mobile_pack_base/group_detection.php'; $wpmp_theme_group = group_detection(); } else { $wpmp_theme_group = ''; } } return $wpmp_theme_group; }
function wpmp_switcher_wp_cache_check_mobile($cache_key) { if (!isset($_SERVER["HTTP_USER_AGENT"])) { return $cache_key; } $is_mobile = wpmp_switcher_is_mobile_browser(); $mobile_group = ''; $wp_mobile_pack_dir = WP_CONTENT_DIR . '/plugins/wordpress-mobile-pack'; if ($is_mobile && is_file($wp_mobile_pack_dir . '/themes/mobile_pack_base/group_detection.php')) { include_once $wp_mobile_pack_dir . '/themes/mobile_pack_base/group_detection.php'; $mobile_group = group_detection(); } if (isset($GLOBALS['wp_super_cache_debug']) && $GLOBALS['wp_super_cache_debug']) { wp_cache_debug("Lite detection says is_mobile: {$is_mobile} and group: {$mobile_group} for User-Agent: " . $_SERVER["HTTP_USER_AGENT"], 5); } $new_cache_key = $cache_key . $is_mobile . $mobile_group; // In the worst case we return the cache_key as it came in return $new_cache_key; }