function hook_commons_utility_links in Drupal Commons 7.3
Define utility links.
This hook allows modules to register utility links for the functionality that they provide. For example, a social integration module could use it to register a "Find Friends" utility link which points to a page where the current user can search for other site users that they have connected with on social networks such as Twitter or Facebook.
Return value
An associative array of utility links whose keys are used as its CSS class. Each link should be itself an array, with the same elements used in theme_links(), except for the addition of a 'weight' element that is used for ordering the links.
For a detailed usage example, see commons_utility_links.module.
See also
hook_commons_utility_links_alter()
3 functions implement hook_commons_utility_links()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- commons_follow_ui_commons_utility_links in modules/
commons/ commons_follow/ commons_follow_ui/ commons_follow_ui.commons_utility_links.inc - Implements hook_commons_utility_links().
- commons_trusted_contacts_commons_utility_links in modules/
commons/ commons_trusted_contacts/ commons_trusted_contacts.commons_utility_links.inc - Implements hook_commons_utility_links().
- commons_utility_links_commons_utility_links in modules/
commons/ commons_utility_links/ commons_utility_links.commons_utility_links.inc - Implements hook_commons_utility_links().
1 invocation of hook_commons_utility_links()
- commons_utility_links_block_view in modules/
commons/ commons_utility_links/ commons_utility_links.module - Implements hook_block_view().
File
- modules/
commons/ commons_utility_links/ commons_utility_links.api.php, line 33 - Hooks provided by the Commons Utility Links module.
Code
function hook_commons_utility_links() {
$links = array();
if (user_is_logged_in()) {
global $user;
$account = $user;
$links['find_fiends'] = array(
'href' => 'user/' . $account->uid . '/find_friends',
'title' => t('Find friends'),
);
}
return $links;
}