function linkedin_status_linkedin_user_settings_page in LinkedIn Integration 6
Same name and namespace in other branches
- 7 linkedin_status/linkedin_status.pages.inc \linkedin_status_linkedin_user_settings_page()
File
- linkedin_status/
linkedin_status.module, line 153 - Main hooks implementation for LinkedIn Profile module
Code
function linkedin_status_linkedin_user_settings_page($form_state, $account) {
$form = array();
if (user_access('update LinkedIn status')) {
//check if linkedin status update is enabled for at least one content type
$types = node_get_types();
$type = new stdClass();
$type->type = 'event_signup';
$types[] = $type;
$type->type = 'comment';
$types[] = $type;
foreach ($types as $type) {
if (variable_get('linkedin_status_enabled_' . $type->type, '0') == '1') {
//if true add related option
$form['linkedin_status_enabled_by_default'] = array(
'#type' => 'checkbox',
'#default_value' => isset($account->linkedin_status_enabled_by_default) ? $account->linkedin_status_enabled_by_default : '0',
'#title' => t('By default, on actions such as posting content, update your LinkedIn status'),
'#description' => t('(You can always bypass this setting individually)'),
);
break;
}
}
}
return $form;
}