How do you Disable / Enable plugins tab on wordpress?

Viewed 62

I am not talking about plugins, but the plugins tab itself.

The previous dev has disabled updates for wordpress and also disabled the plugins tab and the plugin view.

This is not something thats rare, I remember a previous site where another dev did this so the owner doesnt make breaking changes to the site.

I remember he had commented out some code and added new code in place.

1 Answers

You can use something like this in functions.php file of the child theme.

function admin_remove_plugin_menu(){
 remove_menu_page( 'plugins.php' ); 
}
add_action('admin_menu', 'admin_remove_plugin_menu');
Related