You are here

function scheduler_field_extra_fields in Scheduler 7

Implements hook_field_extra_fields().

File

./scheduler.module, line 801
Scheduler publishes and unpublishes nodes on dates specified by the user.

Code

function scheduler_field_extra_fields() {
  $fields = array();
  foreach (node_type_get_types() as $type) {
    $publishing_enabled = variable_get('scheduler_publish_enable_' . $type->type, 0);
    $unpublishing_enabled = variable_get('scheduler_unpublish_enable_' . $type->type, 0);
    $use_vertical_tabs = variable_get('scheduler_use_vertical_tabs_' . $type->type, 1);
    if (($publishing_enabled || $unpublishing_enabled) && !$use_vertical_tabs) {
      $fields['node'][$type->type]['form']['scheduler_settings'] = array(
        'label' => t('Scheduler'),
        'description' => t('Fieldset containing scheduling settings'),
        'weight' => 0,
      );
    }
  }
  return $fields;
}