How do I get slug of all active plugins programmatically? May 19, 2022 by Tarik Billa Use option active_plugins to get all plugin init files. e.g. $current = get_option( 'active_plugins', array() ); // print_r( $current ); Here, htmlpress is the plugin slug.