Using the following line of snippets, you will be able to deactivate all WordPress plugins.