Support » Plugin: OPcache Dashboard » need to hide plugin on dashboard page

  • Hi There!
    I have users visiting their profile and need to disable the opcache widget from the Dashboard homepage.

    Some coding I’ve tried isn’t working. Any help is greatly appreciated.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Try moving the plugin to mu-plugins directory instead of hacking the code.

    If that doesn’t work make sure your roles and caps are set properly for your users and make opCache menus only available to site admins.

    The div of the box in dashboard have the id=”opcache_graph”… Then, you only need add the style:

    #opcache_graph { display: none !important; }

    Use the hook: add_action(‘admin_head’, ‘admin_styles’);

    Where ‘admin_styles’ is the function for handle the styles, for example:

    function admin_styles() {
         echo '<style> #opcache_graph { display: none !important; } </style>';
    add_action('admin_head', 'admin_styles');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘need to hide plugin on dashboard page’ is closed to new replies.