/**
 * Get allowed file extensions for this type as array
 * 
 * @param type $type audio|photo|video etc
 * @return array( 'jpg', 'gif', ..)//allowed extensions for a given type
 */
function mpp_get_allowed_file_extensions($type)
{
    if (!mpp_is_registered_type($type)) {
        //should we only do it for active types?
        return array();
    }
    $type_object = mpp_get_type_object($type);
    return $type_object->get_allowed_extensions();
}
 /**
  * Get current gallery type being added/edited
  * 
  * @return string empty string or the actual type 'photo|video etc'
  */
 private function get_editing_gallery_type()
 {
     if ($this->is_add_gallery()) {
         $type = $_GET['mpp-gallery-type'];
         if (mpp_is_registered_type($type)) {
             return $type;
         }
         return '';
         //no type,invalid
     } elseif ($this->is_edit_gallery()) {
         global $post;
         $gallery = mpp_get_gallery($post);
         return $gallery->type;
     }
     return '';
 }
/**
 *  Get gallery count by gallery type
 * 
 * @param type $type
 * @param string $owner_type component( members|groups)
 * @param type $owner_id user_id|grup_id etc
 * @param type $status public|private etc
 * @return int
 */
function mpp_get_gallery_count_by_type($type, $owner_type, $owner_id, $status = null)
{
    //check for the vailidity of the gallery type
    if (!mpp_is_registered_type($type)) {
        return 0;
        //ahh , that's not right
    }
    return mpp_get_gallery_count(array('component' => $owner_type, 'component_id' => $owner_id, 'type' => $type, 'status' => $status));
}