You are here

function addthis_form_node_type_form_alter in AddThis 7.2

Implement hook_form_FORM_ID_alter().

File

./addthis.module, line 87
Stand alone module file to handle AddThis button integration

Code

function addthis_form_node_type_form_alter(&$form, $form_state) {
  $form['addthis'] = array(
    '#type' => 'fieldset',
    '#title' => t('Addthis settings'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#group' => 'additional_settings',
  );
  $form['addthis']['addthis_nodetype'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show AddThis button on this type of node'),
    '#default_value' => variable_get('addthis_nodetype_' . $form['#node_type']->type, 1),
    '#description' => t('Select whether the AddThis button should be shown or not on this type of node.'),
  );
}