You are here

function entity_embed_update_7300 in Entity Embed 7.3

Add support for restricting embedding to specific display plugins.

File

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

Code

function entity_embed_update_7300() {

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

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