rtCamp / nginx-helper

Nginx Helper for WordPress caching, permalinks & efficient file handling in multisite

Home Page:https://wordpress.org/plugins/nginx-helper/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hide Purge Cache button when purge is disabled

mbautista opened this issue · comments

Hello,
We use nginx-helper only for the mapping feature, we don't use de cache feature because we use wp-ffpc (memcached).

The purge feature is disable (enable_purge unchecked) on our network, but the "Purge cache" button still appears, confusing our users because it does not actually purge our (memcached) cache.

So we added a condition in includes/class-nginx-helper.php around line 206 to fix this :

if ( $nginx_helper_admin->options['enable_purge'] ) {
   $this->loader->add_action( 'admin_bar_menu', $nginx_helper_admin, 'nginx_helper_toolbar_purge_link', 100 );
}

It would be cool if this fix could be included in the next releases ? :)
Thank you very much !
Mathieu.

@mbautista Thanks for creating an issue. We will work on this and will release in next version.