WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to remove the edit option for all plugins on a wordpress site. Is there a hook/filter for doing this? It would be preferred to do it from the theme's functions file, rather than try to disable it within each plugin. Ideally, it could be removed for users without admin privileges, but that is a secondary concern.

enter image description here

share|improve this question
up vote 3 down vote accepted

Add the following line to your WordPress installs wp-config.php

share|improve this answer
That did it! Awesome. However, due to the version control setup we have, I would still prefer to do it within the theme functions. And the good news is, you can put this code there instead, and it still works! Merci! – Starfs May 11 '12 at 14:49
Yup, you can set wordpress constants elsewhere as well. wp-config.php simply is the default location where you'd do so. If within the theme seems to be a better fit for your case, I don't see why you shouldn't set it there. You can wrap it in conditionals (user role) there as well. – Johannes Pille May 11 '12 at 14:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.