Cette page est également disponible en Français Français

Recently I had to deal with the W3 Total Cache option to make some conditional tests in the admin, but I discovered that there is no option saved in the database.

Actually, plugin’s options are stored in a PHP file in your wp-content directory. Don’t ask me why, I don’t have the answer…

After having crawled the plugin functions, I have finally find a way to retrieve these options with this simple snippet.

The fonction will return an array of the plugin options or false if there is no option.

This snippet use the native plugin’s functions, so it is Multisite compatible, as the plugin.

Hope this helps!


Brice Capobianco

WordPress addict and self-taught. I love to learn and to create, then to share…
Founder of b-website.com