Generically get path to any entity How can I get the path to an entity whether it's a user, term, node, etc? Of course, I can just figure out the type of the entity and then go through a switch for the proper URL, but that doesn't seem to be the best solution.
entity_uri() is an option, e.g.

$uri = entity_uri('node', $node);
$path = $uri['path']; // $path is e.g. node/1

$uri = entity_uri('taxonomy_term', $term);
$path = $uri['path']; // $path is e.g. taxonomy/term/1


It's best to use the API for this, even if hardcoding is an option. It's possible for the URI template for any entity type to be changed using hook_entity_info_alter, so you can't always guarantee it's going to be what came out of the box.