Created
October 12, 2020 12:55
-
-
Save ajmaurya99/e6766ece4188911b1189389869bf5a3c to your computer and use it in GitHub Desktop.
Hide Autoptimize clear cache button for users in WordPress Dashboard.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This style hides the autoptimize clear cache button for users in WordPress Dashboard. | |
add_action('admin_head', function() { ?> | |
<style> | |
#wp-admin-bar-autoptimize-delete-cache, | |
.wp-core-ui .button-primary[name="autoptimize_cache_clean"] { | |
display: none; | |
} | |
</style> | |
<?php }, 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment