• In plugin http://yoast.com/wordpress/google-analytics/, wouldn’t it be better code practice to check for the existance of each of the w3tc_ functions individually before calling them.

    if ( function_exists(‘w3tc_pgcache_flush’) ) {
    w3tc_pgcache_flush();
    w3tc_dbcache_flush();
    w3tc_minify_flush();
    w3tc_objectcache_flush();
    $cache = ‘ and W3TC Caches cleared‘;
    } else if ( function_exists(‘wp_cache_clear_cache’) ) {
    wp_cache_clear_cache();
    $cache = ‘ and WP Super Cache cleared‘;
    }

Viewing 9 replies - 1 through 9 (of 9 total)
  • Why would that be an issue? If the first exists, W3TC is loaded and all should normally exist?

    Anyway, I’ll check my code. Next time, try and be nice 🙂

    No, Joost. That’s not how it works. W3TC is modular and you can load all or some of it.

    Yes the function_exists() verifes that the plugin is active, but the pgcache, dbcache, minify and objectcache stuff can all be turned on or off selectively.

    I’ll fix, next time, please drop me an email if you’re having issues on your setup.

    That’s what a support forum is for. 😛

    Well, not if you have a relationship were you could have just emailed me.

    “Well, yes, until you go out and tell people my stuff doesn’t work before getting a reply.”

    I have no idea what you’re on about. Really very confused. As far as I know, Mark posted that one post above… and that’s it until you responded today. So I’d highly recommend you actually email me before causing a scene. You have my contact info.

    just reached out on Skype. Let’s talk.

    Thread Starter markkelnar

    (@markkelnar)

    No harsh tone intended. Glad we were able to come together to resolve the issue.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Google Analytics – checking for existance of W3TC functions before use’ is closed to new replies.