Helper functions for sc.js, and custom post types