markkelnar
Member
Posted 10 months ago #
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';
}
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 :)
Aaron Brazell
Member
Posted 8 months ago #
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.
Aaron Brazell
Member
Posted 8 months ago #
That's what a support forum is for. :P
Well, not if you have a relationship were you could have just emailed me.
Aaron Brazell
Member
Posted 8 months ago #
"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.
markkelnar
Member
Posted 8 months ago #
No harsh tone intended. Glad we were able to come together to resolve the issue.