menu get object - to load the current entity

One option for loading a node or a term page is to use entity load.
Another option that works for loading the current node or term page you are on is to use menu_get_object()

To load the current node

<?php
  $oEntity
= menu_get_object();
//  - or -
$oEntity = menu_get_object('node', 1);
?>

To load a term page

<?php
  $oEntity
menu_get_object('taxonomy_term', 2);
?>

To load a user (not that we do that often)

<?php
  $oEntity
menu_get_object('user');
?>

The function returns false if the target doesn't match what you are currently on, so something like this would work to load the current entity for a few different entity types. The following two lines of code would return the loaded entity whether you are on a node or a term page.

<?php
  $oEntity
= menu_get_object();
$oEntity = (!empty($oEntity) ) ? $oEntity menu_get_object('taxonomy_term', 2);
$oEntity = (!empty($oEntity) ) ? $oEntity menu_get_object('user');
//additional checks could be added in to check and  load entities other than nodes and terms. 
?>

Reference: http://api.drupal.org/api/drupal/includes%21menu.inc/function/menu_get_o...

section: