After seeing thousands of useful API functions in the WordPress core, I’m surprised to discover today that there ain’t a function that would list the active plug-ins. I don’t know you but I’m quite surprised at that.

I was wondering if there is a reason for missing that?
If so, I’d like to know about it.

And, if there is a quick PHP snippet you know of that could give you a list of active plugins, ( the same way that a get_post_types('','names'); does for CPT’s or get_taxonomies('','names'); does for CTs ), I’d appreciate it if you provide the code.

2 s
2

wp_get_active_and_valid_plugins()

get_plugins()

and get_option('active_plugins')

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *