You are here

function paragraphs_field_create_field in Paragraphs 7

Implements hook_field_create_field().

File

./paragraphs.module, line 1334
Paragraphs hooks and common functions.

Code

function paragraphs_field_create_field($field) {
  if ($field['type'] == 'paragraphs') {

    // Clear caches.
    entity_info_cache_clear();

    // Do not directly issue menu rebuilds here to avoid potentially multiple
    // rebuilds. Instead, let menu_get_item() issue the rebuild on the next
    // request.
    variable_set('menu_rebuild_needed', TRUE);
  }
}