You are here

function _addthis_field_info_formatter_field_type in AddThis 7.4

Implementation to retrieve formatters for a given type of field.

2 calls to _addthis_field_info_formatter_field_type()
AddThis::getDisplayMarkup in classes/AddThis.php
AddThis::getDisplayTypes in classes/AddThis.php

File

includes/addthis.field.inc, line 51
Field related hook implementations for the AddThis-module.

Code

function _addthis_field_info_formatter_field_type($field_type = NULL) {
  $formatters = field_info_formatter_types();
  foreach ($formatters as $key => $formatter) {
    if (!in_array(!isset($field_type) ? AddThis::FIELD_TYPE : $field_type, $formatter['field types'])) {
      unset($formatters[$key]);
    }
  }
  return $formatters;
}