You are here

function media_embed_text_processing_fields in Media WYSIWYG Embed 7

Returns an array containing the names of all fields that perform text filtering.

Parameters

string $entity_type: Entity type.

object $entity: Entity object.

Return value

array

1 call to media_embed_text_processing_fields()
media_embed_file_usage_parse in includes/media_embed.file_usage.inc
Parse file references from an entity's text fields and return them as an array.

File

includes/media_embed.file_usage.inc, line 134
Functions related to the tracking the file usage of embedded media.

Code

function media_embed_text_processing_fields($entity_type, $entity) {
  list(, , $bundle) = entity_extract_ids($entity_type, $entity);
  $fields = field_info_instances($entity_type, $bundle);
  $items = array();
  foreach ($fields as $field_name => $field) {
    if (!empty($field['settings']['text_processing'])) {
      $items[] = $field_name;
    }
  }
  return $items;
}