diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc index 5285e7311..cea7b037b 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6567,19 +6567,21 @@ function entity_prepare_view($entity_type, $entities) { } /** - * Returns the path to an entity. + * Returns the uri elements of an entity. * * @param $entity_type * The entity type; e.g. 'node' or 'user'. * @param $entity * The entity for which to generate a path. * @return - * The path for the entity, or NULL if the entity has no page of its own. + * An array containing the 'path' and 'options' keys used to build the uri of + * the entity, and matching the signature of url(). NULL if the entity has no + * uri of its own. */ -function entity_path($entity_type, $entity) { +function entity_uri($entity_type, $entity) { $info = entity_get_info($entity_type); - if (isset($info['path callback']) && function_exists($info['path callback'])) { - return $info['path callback']($entity); + if (isset($info['uri callback']) && function_exists($info['uri callback'])) { + return $info['uri callback']($entity) + array('options' => array()); } } /** |