Clear Cache Link at the Toolbar

One of the ways to clear cache is clicking on the link which exists at the admin toolbar. You can configure the feature easily via wp-config.php file. Although It only appears for admins as default, you can make it visible for the other roles.

Hide Toolbar Link

If you want to hide toolbar link, you need to add the following line after <?php which exists at the top of wp-config.php file.

Show the Link to the Authors

If you want to show the clear link to the Authors, you need to modify wp-config.php. Just you need to add following rule into wp-config.php

Show the Link to the Editors

If you want to show the clear link to the Editors, you need to modify wp-config.php. Just you need to add following rule into wp-config.php

Show the Link to the Customer Roles

You can show the clear link to the custom roles as well. This is so easy to use. You can define as WPFC_TOOLBAR_FOR_{CUSTOM_ROLE_TYPE} and add into the wp-config.php file. The matching is case-insensitive. Please let me explain with some samples;

# Example 1

If you have defined a custom role which is “Teacher”, you can define it as below.

# Example 2

If you have defined a custom role which is “Student”, you can define it as below.