public static function list_comment_types($refresh = false) { if ($refresh || empty(self::$comment_type_list)) { self::$comment_type_list = DB::get_keyvalue('SELECT id, name FROM {commenttype} WHERE active = 1;'); } self::$comment_type_list = Plugins::filter('list_comment_types', self::$comment_type_list); return self::$comment_type_list; }