You are here

function scheduler_i18n_sync_options in Scheduler 7

Implements hook_i18n_sync_options().

File

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

Code

function scheduler_i18n_sync_options($entity_type, $bundle_name) {

  // Keep the scheduler dates synchronised between separate nodes which have
  // been defined as translations of each other.
  if ($entity_type == 'node') {
    $options = array();

    // $bundle_name holds the content_type.
    if (variable_get('scheduler_publish_enable_' . $bundle_name, 0)) {
      $options['publish_on'] = array(
        'title' => t('Publish on'),
        'description' => t('Scheduler Publish date and time'),
      );
    }
    if (variable_get('scheduler_unpublish_enable_' . $bundle_name, 0)) {
      $options['unpublish_on'] = array(
        'title' => t('Unpublish on'),
        'description' => t('Scheduler Unpublish date and time'),
      );
    }
    return $options;
  }
}