You are here

function fblikebutton_ds_fields_info in Facebook Like Button 7.2

Implements hook_ds_fields_info().

File

./fblikebutton.module, line 208
Adds Facebook's "Like" button to each selected node type. Adds a block with a global static value where users can "Like" the URL set by admins.

Code

function fblikebutton_ds_fields_info($entity_type) {
  $fields = array();
  if ($entity_type == 'node') {
    $ui_limit = array();
    $bundles = variable_get('fblikebutton_node_types', array());
    foreach ($bundles as $bundle) {
      $ui_limit[] = $bundle . '|*';
    }
    $fields['node'] = array();
    $fields['node']['fblikebutton_ds_field'] = array(
      'title' => t('Dynamic Facebook Like button'),
      'field_type' => DS_FIELD_TYPE_FUNCTION,
      'function' => '_fblikebutton_ds_field',
      'ui_limit' => $ui_limit,
    );
  }
  return $fields;
}