function homebox_get_path in Homebox 7.3
Same name and namespace in other branches
- 6.3 homebox.module \homebox_get_path()
- 6.2 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.
3 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.
- homebox_restore_defaults_submit in ./
homebox.module - Submit function for homebox_restore_defaults.
File
- ./
homebox.module, line 324 - 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'];
}