function mediafront_user_settings in MediaFront 7.2
1 string reference to 'mediafront_user_settings'
- mediafront_user_menu in modules/
mediafront_user/ mediafront_user.module - Implements hook_menu().
File
- modules/
mediafront_user/ mediafront_user.module, line 22
Code
function mediafront_user_settings($form, $form_state, $account) {
// Set the user account in the form.
$form['account'] = array(
'#type' => 'value',
'#value' => $account->uid,
);
// Get the current settings.
$settings = mediafront_get_settings('osmplayer', $account->data['mediafront']);
$preset = array(
'player' => 'osmplayer',
'settings' => $settings,
);
$settings_form = mediafront_player_settings_form($preset);
// Add auto play to the media player settings.
$form['autoplay'] = $settings_form['media_settings']['autoplay'];
// Add a submit handler.
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save Settings',
);
return $form;
}