You are here

function certificate_content_extra_fields in Certificate 6.2

Same name and namespace in other branches
  1. 6 certificate.module \certificate_content_extra_fields()

Implementation of hook_content_extra_fields().

Allow the certificate download link to be sorted in the node edit forms.

File

./certificate.module, line 407
Certificate module.

Code

function certificate_content_extra_fields($type_name) {
  $extras = array();
  $node = new stdClass();
  $node->type = $type_name;
  if (certificate_node_is_certifiable($node)) {
    $extras['certificate'] = array(
      'label' => t('Certificate'),
      'description' => t('Certificate link.'),
      'weight' => 10,
    );
  }
  if ($type_name == 'certificate') {
    $extras['certificate_tokens'] = array(
      'label' => t('Certificate tokens'),
      'description' => t('Tokens to insert into the certificate.'),
    );
  }
  return $extras;
}