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.