public function is_mobile() { if (function_exists('bnc_wptouch_is_mobile')) { return bnc_wptouch_is_mobile(); } $mobile_detector = new Mobile_Detect_2_6_2(); return $mobile_detector->isMobile(); }
static function is_wptouch() { if (function_exists('bnc_wptouch_is_mobile') && bnc_wptouch_is_mobile()) { return true; } global $wptouch_pro; if (defined('WPTOUCH_VERSION') || is_object($wptouch_pro)) { if ($wptouch_pro->showing_mobile_theme) { return true; } } return false; }
/** * Verify if wptouch plugin function for mobile detection is on * @return bool */ function fa_is_wptouch_mobile() { $is_mobile = false; if (function_exists('bnc_wptouch_is_mobile')) { $is_mobile = bnc_wptouch_is_mobile(); } return $is_mobile; }
return $size; } function wptouch_idevice_classes() { $iPhone = strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone'); $iPod = strstr($_SERVER['HTTP_USER_AGENT'], 'iPod'); $iOS5 = strstr($_SERVER['HTTP_USER_AGENT'], 'OS 5_0'); if ($iPhone || $iPod) { echo 'idevice'; } if ($iOS5 && wptouch_use_fixed_header()) { echo ' ios5'; } } // Remove the admin bar when logged in and looking at WPtouch if (bnc_wptouch_is_mobile() && function_exists('show_admin_bar')) { add_filter('show_admin_bar', '__return_false'); } // WPtouch Filters add_filter('post_thumbnail_size', 'wptouch_thumbnail_size'); remove_action('wp_head', 'gigpress_head'); remove_filter('the_excerpt', 'do_shortcode'); remove_filter('the_content', 'do_shortcode'); remove_action('wp_default_scripts', array('JCP_UseGoogleLibraries', 'replace_default_scripts_action'), 1000); remove_filter('the_content', 'auto_sociable'); remove_filter('the_excerpt', 'auto_sociable'); remove_filter('the_content', 'whydowork_adsense_filter', 100); remove_filter('the_excerpt', 'whydowork_adsense_filter', 100); // Facebook Like button remove_filter('the_content', 'Add_Like_Button'); //Sharebar Plugin
function __deactivate_rocket_lazyload_with_wptouch() { if (function_exists('wptouch_is_mobile_theme_showing') && wptouch_is_mobile_theme_showing() || function_exists('bnc_wptouch_is_mobile') && bnc_wptouch_is_mobile()) { add_filter('do_rocket_lazyload', '__return_false'); } }