Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Purge Cache button when purge is disabled #218

Closed
mbautista opened this issue Dec 13, 2019 · 1 comment · Fixed by #219
Closed

Hide Purge Cache button when purge is disabled #218

mbautista opened this issue Dec 13, 2019 · 1 comment · Fixed by #219
Assignees

Comments

@mbautista
Copy link

@mbautista mbautista commented Dec 13, 2019

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.

@chandrapatel chandrapatel self-assigned this Dec 18, 2019
@chandrapatel

This comment has been minimized.

Copy link
Collaborator

@chandrapatel chandrapatel commented Dec 18, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.