wp_super_cache_maybe_disable_wptouch()
disable mobile checking if.
No Hooks.
Return
null
. Nothing (null).
Usage
wp_super_cache_maybe_disable_wptouch( $t );
- $t (required)
- -
wp_super_cache_maybe_disable_wptouch() wp super cache maybe disable wptouch code WPSCache 1.12.4
function wp_super_cache_maybe_disable_wptouch( $t ) { global $cache_wptouch, $wptouch_exclude_ua; if ( '1' !== $cache_wptouch ) { return false; } if ( ( isset( $_COOKIE['wptouch_switch_toggle'] ) && 'normal' === $_COOKIE['wptouch_switch_toggle'] ) || ( isset( $_COOKIE['wptouch-pro-view'] ) && 'desktop' === $_COOKIE['wptouch-pro-view'] ) ) { return true; } $ua = explode( ',', $wptouch_exclude_ua ); foreach ( $ua as $agent ) { if ( preg_match( "#$agent#i", $_SERVER['HTTP_HOST'] ) ) { return true; // disable mobile ua check if matches the exclude list in wptouch. } } return false; }