Skip to content

Hide Purge Cache button when purge is disabled #218

Closed
@mbautista

Description

@mbautista

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions