public static function get_types()
 {
     global $wpdb;
     return $wpdb->get_col("SELECT DISTINCT `type` FROM " . FileType::table_name());
 }
 /**
  * Fetch all valid feeds.
  * 
  * A feed is valid if...
  * 
  * - it has an asset assigned (and the asset has a filetype assigned)
  * - the slug in not empty
  * 
  * @return array list of feeds
  */
 public function feeds()
 {
     return $this->with_blog_scope(function () {
         $sql = "\n\t\t\t\tSELECT\n\t\t\t\t\tf.*\n\t\t\t\tFROM\n\t\t\t\t\t" . Feed::table_name() . " f\n\t\t\t\t\tJOIN " . EpisodeAsset::table_name() . " a ON a.id = f.episode_asset_id\n\t\t\t\t\tJOIN " . FileType::table_name() . " ft ON ft.id = a.file_type_id\n\t\t\t\tWHERE\n\t\t\t\t\tf.slug IS NOT NULL\n\t\t\t\tORDER BY \n\t\t\t\t\tposition ASC\n\t\t\t";
         return Feed::find_all_by_sql($sql);
     });
 }