You are here

function entity_embed_update_7100 in Entity Embed 7.3

Same name and namespace in other branches
  1. 7 entity_embed.install \entity_embed_update_7100()
  2. 7.2 entity_embed.install \entity_embed_update_7100()

Add support for restricting embedding to specific entity bundles.

File

./entity_embed.install, line 102
Install, update and uninstall functions for the entity_embed module.

Code

function entity_embed_update_7100() {

  // Add new columns to {entity_embed}.
  db_add_field('entity_embed', 'entity_type_bundles', array(
    'type' => 'text',
    'size' => 'big',
    'not null' => TRUE,
    'serialize' => TRUE,
    'object default' => array(),
    'initial' => serialize(array()),
    // Set the value of 'entity_type_bundles' to a serialized empty array for all existing embed buttons.
    'description' => 'Entity type bundles.',
  ));

  // Clear the cache_entity_embed cache.
  cache_clear_all(NULL, 'cache_entity_embed');
}