2

I added a filter for option_active_plugins to keep most plugins from loading on an admin page. Confirmed to be on the right page and to be returning a properly altered array, but it's having no effect on which plugins are being included on the page.

Tried high numbers for filter priority. No effect. Any ideas?

  • 3
    Where/how are you adding the filter? Post you code please and state which file the code is in. – s_ha_dum May 10 '13 at 20:20
  • Have you seen this? – fuxia May 10 '13 at 20:40
  • That's exactly what I'm doing. It doesn't work in my own plugin, and it doesn't work in the plugin-organizer plugin either. – beej May 10 '13 at 20:48
  • 2
    Have you already noticed the "edit" link at the bottom of your question? – kaiser May 10 '13 at 21:05
  • My apologies for the lack of info. Will post an answer when time is up. – beej May 10 '13 at 23:51
1

OK, duh: I needed to have my plugin in the /mu-plugins dir to make its filter available early enough for function wp_get_active_and_valid_plugins().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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