Create a WordPress plugin that runs when another plugin is installed

3148 views php
7

So here's the deal: We're 000webhost moderators, and we are looking for solutions to deny users from installing unsupported cache plugins (Just because some cache plugins are not compatible with the hosting, and cause HTTP error 500).

So, we thought of creating a plugin that runs when the WordPress plugin installer runs. Then if the plugin's name is in our blacklisted list, tell the user they can't install it.

The main question is how to let the plugin run on installation of other plugins. Examples would be great, too.

Thank you in advance!

Christopher, from 000webhost

answered question

Maybe it's better to just supply the user with error logs and let them figure it out.

Wouldn't be possible because HTTP error 500 would block full access to the website :)

Eeek, so your saying a single customer could bring down your entire hosting platform, knock out the control panel, FTP, support and everything?

1 Answer

6

Utilising the plugin activation hook may help you with your needs where you could define a list of blacklisted plugin names.

posted this

Have an answer?

JD

Please login first before posting an answer.