You are here

function paging_field_extra_fields in Paging 7

Implements hook_field_extra_fields().

File

./paging.module, line 391
Allows a node to be broken into multiple pages via a tag.

Code

function paging_field_extra_fields() {
  $setting = variable_get('paging_pager_count', 'one');
  $extra = array();
  foreach (entity_get_info() as $entity_type => $entity_info) {
    foreach (array_keys($entity_info['bundles']) as $bundle) {
      $extra[$entity_type][$bundle]['display']['paging'] = array(
        'label' => t('Pager'),
        'description' => t('Pager for paging module.'),
        'weight' => 20,
      );
      if ($setting == 'two') {
        $extra[$entity_type][$bundle]['display']['paging_above'] = array(
          'label' => t('Pager (top)'),
          'description' => t('A second pager for paging module, useful when you want one at both the top and bottom.'),
          'weight' => -20,
        );
        $extra[$entity_type][$bundle]['display']['paging']['label'] = t('Pager (bottom)');
      }
    }
  }
  return $extra;
}