Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Hook into supercache to disable it for mobile sites
- *
- * Needed because otherwise mobile agents recognized by mobile edition
- * but not supercache end up caching to the general pool, and visitors
- * see the mobile versions.
- *
- * Until the supercache list updates itself dynamically this will mean
- * that mobile agents unknown to supercache will get inconsistent results
- * but that the main mobile agents will consistently see uncached pages and
- * browser visitors will see cached versions of the regular theme.
- */
- function gv_turn_off_caching_for_mobile() {
- if (function_exists('cfmobi_check_mobile') AND cfmobi_check_mobile()) :
- define('DONOTCACHEPAGE', TRUE);
- endif;
- }
- add_action('init', 'gv_turn_off_caching_for_mobile');
- ?>
Add Comment
Please, Sign In to add comment