Hide mu-plugins list

The solution to this request is filtering show_advanced_plugins. This filter is called twice, once for mustuse– and once for dropins-plugins.

The filter accepts two parameters, the first one being the standard value (true), and the second one being the type of the advanced plugin (Must-Use and Drop-In).

So returning false does the trick, if your condition is met. If you want Dropt-Ins to be hidden as well, just set the function to return false.

Please be aware that a Plugin can alter this filter, so you may have to change the priority to achieve the desired results (3rd parameter). Also return the $default value in the standard case, to allow other functions the same functionality.

And here comes the code:

add_filter( 'show_advanced_plugins', 'f711_hide_advanced_plugins', 10, 2 );

function f711_hide_advanced_plugins( $default, $type ) {
    if ( $type == 'mustuse' ) return false; // Hide Must-Use
    return $default;
}