Its a minor bug and you already sort of describe it in your code when writing there should be a better way to get the content type. In the form you are doing it now you didnt include content types with underscores. Say for example: content_type in the url will be content-type. A simple str_replace could be a solution.
$type = arg(3);
$type = str_replace('-', '_', $type);
But maybe there is a better way.
Comments
Comment #1
joelstein commentedGood catch! Fixed in the latest release.
Comment #2
joelstein commented