You are here

function google_plusone_ds_fields_info in Google Plus One Button | Google+ Badge 7

Implements hook_ds_fields_info(). Display Suite hook

File

./google_plusone.module, line 584

Code

function google_plusone_ds_fields_info($entity_type) {
  $fields = array();
  if ($entity_type == 'node') {
    $ui_limit = array();
    $bundles = variable_get('google_plusone_node_types', array());
    foreach ($bundles as $bundle) {
      $ui_limit[] = $bundle . '|*';
    }
    $fields['node'] = array();
    $fields['node']['google_plusone_ds_field'] = array(
      'title' => t('Google Plus One +1 field'),
      'field_type' => DS_FIELD_TYPE_FUNCTION,
      'function' => '_google_plusone_ds_field',
      'ui_limit' => $ui_limit,
    );
  }
  return $fields;
}