function dynamic_background_blog_form in Dynamic Background 6
Same name and namespace in other branches
- 7.2 modules/dynamic_background_blog/dynamic_background_blog.module \dynamic_background_blog_form()
- 7 modules/dynamic_background_blog/dynamic_background_blog.module \dynamic_background_blog_form()
Menu callback that generates the form used in the "My blog background" tab on the user profile page.
1 string reference to 'dynamic_background_blog_form'
- dynamic_background_blog_menu in modules/
dynamic_background_blog/ dynamic_background_blog.module - Implementation of hook_menu(). Hooks into the dynamic background modules menu structure and adds the "blog" menu tab to the administration interface.
File
- modules/
dynamic_background_blog/ dynamic_background_blog.module, line 74
Code
function dynamic_background_blog_form($form_id, $user) {
$form = array();
// Hidden fields that stores the used id of the user being edited.
$form['uid'] = array(
'#type' => 'hidden',
'#value' => $user->uid,
);
// Add image selector.
$form['dynamic_background'] = dynamic_background_image_selector_form(dynamic_background_blog_get_image_id($user->uid));
// Add submit handler.
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Update background'),
);
return $form;
}