Title: [Plugin: WP Super Cache] Compat. with WordPress Mobile Edition toggle link?
Last modified: August 19, 2016

---

# [Plugin: WP Super Cache] Compat. with WordPress Mobile Edition toggle link?

 *  [Dana Ross](https://wordpress.org/support/users/csixty4/)
 * (@csixty4)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-super-cache-compat-with-wordpress-mobile-edition-toggle-link/)
 * WordPress Mobile Edition lets you insert a call (see their FAQ) into your template
   to toggle between the regular & mobile versions on an normal (or unrecognized)
   browser. But, they not this functionality isn’t compatible with WP Super Cache.
 * I got this functionality working by adding the following to wp_cache_check_mobile(
   coincidentally, a function derived from WordPress Mobile Edition — trippy!)
 * `
    if( !isset( $wp_cache_mobile_enabled ) || false == $wp_cache_mobile_enabled)
   return $cache_key;
 *  if (!array_key_exists('cf_action', $_REQUEST) || $_REQUEST['cf_action'] != '
   reject_mobile')
    { $showMobile = (isset($_REQUEST['cf_action']) && $_REQUEST['
   cf_action'] == 'show_mobile'); $mobile = (isset($_COOKIE['cf_mobile']) && $_COOKIE['
   cf_mobile'] == "true");
 *  if( $mobile || $showMobile) {
    return $cache_key.'mobile'; }
 *  }
 *  if (!isset($_SERVER["HTTP_USER_AGENT"])) {
    return $cache_key; }
 * Well, there it is if you’re interested in adding this compatibility to WP Super
   Cache. I think it would be a great addition to your plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Dana Ross](https://wordpress.org/support/users/csixty4/)
 * (@csixty4)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-super-cache-compat-with-wordpress-mobile-edition-toggle-link/#post-1063250)
 * Oh yeah, the two lines in wp-mobile.php (part of WordPress Mobile Edition) that
   look like this:
 * `if (!defined('WPCACHEHOME')) {`
 * need to be commented out, along with the corresponding closing braces, in order
   for this to work.
 *  [eventum](https://wordpress.org/support/users/eventum/)
 * (@eventum)
 * [17 years ago](https://wordpress.org/support/topic/plugin-wp-super-cache-compat-with-wordpress-mobile-edition-toggle-link/#post-1063425)
 * Hello,
 * This is very cool, sure hope they do use this!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WP Super Cache] Compat. with WordPress Mobile Edition toggle
link?’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [eventum](https://wordpress.org/support/users/eventum/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/plugin-wp-super-cache-compat-with-wordpress-mobile-edition-toggle-link/#post-1063425)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
