How to list plugins by a specific category?

Is there an Elgg function to do this? Or do I need to make a custom query? I couldn't seem to find any functions related to plugins and categories on the reference page.

  • Never mind, figured it out. Here's the code if anyone wants it.

    $installed_plugins = elgg_get_plugins('any');

    foreach ($installed_plugins as $id => $plugin) {
        $plugin_categories = $plugin->getManifest()->getCategories();
        if (in_array('put whatever category you need to list here', $plugin_categories)) {
            echo $plugin->title;
        }
    }