function follow_links_load in Follow 7.2
Same name and namespace in other branches
- 5 follow.module \follow_links_load()
- 6 follow.module \follow_links_load()
- 7 follow.module \follow_links_load()
Loader function for individual links.
Parameters
$uid: An int containing the uid of the user. uid 0 pulls the site follow links.
Return value
A single link in array format, or FALSE if none matched the incoming ID.
3 calls to follow_links_load()
- follow_links_form in ./
follow.module - The form for editing follow links.
- follow_preprocess_page in ./
follow.module - Implements hook_preprocess_page().
- _follow_block_content in ./
follow.module - Helper function to build the block content display.
File
- ./
follow.inc, line 250 - Follow module API and helper functions.
Code
function follow_links_load($uid = 0) {
$links = array();
$sql = "SELECT * FROM {follow_links} WHERE uid = :uid ORDER BY weight ASC";
$result = db_query($sql, array(
':uid' => $uid,
));
foreach ($result as $link) {
$link->options = unserialize($link->options);
$link->url = follow_build_url($link->path, $link->options);
$links[$link->name] = $link;
}
return $links;
}