You are here

function om_node_terms_classes in OM Tools 6.2

Same name and namespace in other branches
  1. 8.2 tools/node/node.inc \om_node_terms_classes()
  2. 7.2 tools/node/node.inc \om_node_terms_classes()

Node Terms Classes Form

1 call to om_node_terms_classes()
om_node_tools in tools/node/node.inc
Node Tools Form

File

tools/node/node.inc, line 198
Node Tools

Code

function om_node_terms_classes($node_defaults = array()) {

  // Node Terms Classes
  $out = array();
  if ($node_defaults['node_terms_classes_reset'] == 1 || !isset($node_defaults['node_terms_classes'])) {
    $node_defaults['node_terms_classes'] = 1;
    $node_defaults['node_terms_classes_prefix'] = 'content-term-';
    $node_defaults['node_terms_classes_reset'] = 0;
  }
  $out['node_terms_classes_switch'] = array(
    '#type' => 'checkbox',
    '#title' => t('Apply node terms classes'),
    '#default_value' => $node_defaults['node_terms_classes_switch'],
  );
  $out['node_terms_classes_settings'] = array(
    '#type' => 'fieldset',
    '#attributes' => array(
      'id' => 'om-group-node-terms-classes-settings',
    ),
    '#title' => t('Node terms classes settings'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $out['node_terms_classes_settings']['node_terms_classes'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add node terms body classes'),
    '#default_value' => $node_defaults['node_terms_classes'],
  );
  $out['node_terms_classes_settings']['node_terms_classes_prefix'] = array(
    '#type' => 'textfield',
    '#title' => t('Node term class prefix'),
    '#default_value' => $node_defaults['node_terms_classes_prefix'],
    '#description' => t('content-term-mobile content-term-technology content-term-educaton ...'),
  );
  $out['node_terms_classes_reset'] = array(
    '#type' => 'checkbox',
    '#title' => t('Reset to default values.'),
    '#default_value' => $node_defaults['node_terms_classes_reset'],
  );
  return $out;
}