How to disable W3 Total Cache “Performance” menu under multisite?

I came across the following article W3 Total Cache – How to disable “Performance” menu under multisite?

However on testing it with the latest version of WordPress 3.7 and W3 Total Cache v0.9.3 it seems to no longer work.

Read More

How can I update the code from the link above so it works

I also have the following code which works it removes the “Performance” from the admin top bar

//Remove Performance
function ds_w3tc_remove_adminbar() {
   global $wp_admin_bar;
     if ( ! is_super_admin() ) {
        $wp_admin_bar->remove_menu('w3tc');
    }
}
add_action( 'admin_bar_menu','ds_w3tc_remove_adminbar',999);

Related posts

1 comment

  1. Please try to remove it with the menu slug 'w3tc_dashboard' instead of 'w3tc_general':

    i.e. use

    remove_menu_page( 'w3tc_dashboard' );
    

    instead of

    remove_menu_page( 'w3tc_general' );
    

    in the linked code example.

Comments are closed.