Skip to content

Hide Purge Cache button when purge is disabled #218

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

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

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
Copy link
Contributor

@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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants