Remove "Delete Cache" button from admin bar
-
Hi,
I am trying to remove the DELETE CACHE button from the WP admin bar completely as it’s not used by me or my clients.
I have removed most of the other admin bar buttons by using this custom function:
function smb_admin_bar() { global $wp_admin_bar; $wp_admin_bar->remove_menu('wp-logo'); $wp_admin_bar->remove_menu('about'); $wp_admin_bar->remove_menu('wporg'); $wp_admin_bar->remove_menu('documentation'); $wp_admin_bar->remove_menu('support-forums'); $wp_admin_bar->remove_menu('feedback'); $wp_admin_bar->remove_menu('view-site'); $wp_admin_bar->remove_menu('comments'); $wp_admin_bar->remove_menu('new-content'); } add_action( 'wp_before_admin_bar_render', 'smb_admin_bar' );
So I assumed I could just add the following and job done:
$wp_admin_bar->remove_menu('delete-cache');
That doesn’t work though. I’ve looked through the WPSC fplugin files and I’m 99% certain that “delete-cache” is the ID you have given the button, so I don’t understand why this isn’t working?
Note: I have searched for a solution to this and it appears some people are happy with un-ticking the “Don’t cache pages for known users” box on the settings page – that removes the button.
However, that won’t work for me since I don’t want to cache pages for known users… but at the same time I simply don’t need the button on my clients sites’ admin bar since the cache is cleared when they edit or publish a new page/ post anyway.
Any help would be appreciated. Thanks
- The topic ‘Remove "Delete Cache" button from admin bar’ is closed to new replies.