/** * Returns the current rating of an object * * @param object $object optional ratings target. If not supplied, the current script object is used * @return float */ function getRating($object = NULL) { if (is_null($object)) { $object = jquery_rating::getCurrentPageObject(); if (!$object) { return NULL; } } return $object->get('rating'); }