• SanDemetrioBike


    Hi, I thing that WPSuperCache it’s one one most used and affordable caching plugin.

    It is shipped with a plugin to support the WPTouch mobile theme.

    I looked at the source code of WPTouch extension for WPSuperCache, and at the WPSuperCache development guide http://z9.io/wp-super-cache-developers/ .

    I think that’s not a trivial task to implement a new one for GNeo, so I would ask you to provide it or if I have to write it on my own (with your support).

    Please tell me about your tought.



    Syahir Hakim


    You can actually already configure WP SueprCache to work with mobile themes. Follow this guide from WPTouch:




    Hi, thank you very much for assistance.

    Unfortunately that solution isn’t enough for me.

    I wrote a filter to integrate Graphene Neo + Any Theme Switcher + WP SuperCache.

    It returns mobile or desktop cache classifier accordingly to the AWTS settings.

    /* WP Super Cache + Any Mobile Theme Switcher + Graphene Neo */

    add_cacheaction('wp_cache_check_mobile', 'custom_wp_cache_check_mobile');

    function custom_wp_cache_check_mobile($cache_key) {
    $log_enabled = isset($GLOBALS['wp_super_cache_debug']) && $GLOBALS['wp_super_cache_debug'];
    $log_prefix = '[custom_wp_cache_check_mobile] ';

    if ($log_enabled) {
    wp_cache_debug($log_prefix . 'Cache key: "' . $cache_key . '"');
    wp_cache_debug($log_prefix . 'User Agent: "' . $_SERVER["HTTP_USER_AGENT"] . '"');

    if (!function_exists('amts_checkMobile')) {
    if ($log_enabled) {
    wp_cache_debug($log_prefix . 'Any Mobile Theme Switcher not installed.');

    return NULL;

    $amts_mobile_check = amts_checkMobile();

    if ($log_enabled) {
    wp_cache_debug($log_prefix . 'Any Mobile Theme Switcher returned: "' . var_export($amts_mobile_check, true) . '"');

    if ($amts_mobile_check['amts_mobile_browser'] == 'Graphene Mobile Neo') {
    $return = "mobile";
    } else {
    $return = "normal";

    wp_cache_debug($log_prefix . 'Returned: "' . $return . '"');

    return $return;

    Is it possibile to integrate inside the theme extensions?



Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.