function set_wp_album_id()
{
if (isset($this->upload['context'])) {
$this->upload['album_id'] = $this->upload['context_id'];
// If context is profile then set album_id to default global album
if ('profile' === $this->upload['context']) {
$this->upload['album_id'] = RTMediaAlbum::get_default();
}
} else {
throw new RTMediaUploadException(9);
// Invalid Context
}
}