function homebox_restore_defaults in Homebox 7.3
Same name and namespace in other branches
- 6.3 homebox.module \homebox_restore_defaults()
- 6.2 homebox.module \homebox_restore_defaults()
- 7.2 homebox.module \homebox_restore_defaults()
Purge user settings for a given page. Used to restore a page to default settings.
Parameters
$page: A homebox page object.
1 string reference to 'homebox_restore_defaults'
- homebox_menu in ./
homebox.module - Implements hook_menu().
File
- ./
homebox.module, line 1490 - Homebox main file, takes care of global functions settings constants, etc.
Code
function homebox_restore_defaults($form, &$form_state, $page) {
global $user;
$form = array();
$form['page'] = array(
'#type' => 'value',
'#value' => $page->name,
);
return confirm_form($form, t('Restore %title to defaults?', array(
'%title' => t($page->settings['title'], array(
'@user' => $user->name,
)),
)), homebox_get_path($page));
}