function homebox_get_path in Homebox 6.2
Same name and namespace in other branches
- 6.3 homebox.module \homebox_get_path()
- 7.3 homebox.module \homebox_get_path()
- 7.2 homebox.module \homebox_get_path()
Return the homebox page path. If it is a tab on the user page, the path is different.
Parameters
$page: A homebox page object.
Return value
The string path.
2 calls to homebox_get_path()
- homebox_add_block in ./
homebox.module - Add a custom block to a user's page.
- homebox_restore_defaults in ./
homebox.module - Purge user settings for a given page. Used to restore a page to default settings.
File
- ./
homebox.module, line 288 - Homebox main file, takes care of global functions settings constants, etc.
Code
function homebox_get_path($page) {
global $user;
if ($user->uid && $page->name === variable_get('homebox_user_tab', '')) {
return 'user/' . $user->uid . '/' . $page->settings['path'];
}
return $page->settings['path'];
}