You are here

function media_wysiwyg_upgrade_token in D7 Media 7.4

Same name and namespace in other branches
  1. 7.3 modules/media_wysiwyg/includes/media_wysiwyg.pages.inc \media_wysiwyg_upgrade_token()

Upgrade a single media token to latest version.

Parameters

array $instance_settings: The media instance settings, aka tag_info.

1 call to media_wysiwyg_upgrade_token()
media_wysiwyg_upgrade_entity_tokens in modules/media_wysiwyg/includes/media_wysiwyg.upgrade.inc
Upgrade media tokens in filtered text fields for a given entity.

File

modules/media_wysiwyg/includes/media_wysiwyg.upgrade.inc, line 97
Code related to media token upgrades.

Code

function media_wysiwyg_upgrade_token(array &$instance_settings) {
  $version = variable_get('media_wysiwyg_token_version', '');
  if (version_compare($version, '3.0', '<')) {
    media_wysiwyg_aggregate_alignment($instance_settings);
  }
  if (version_compare($version, '4.0', '<')) {
    media_wysiwyg_token_upgrade_40($instance_settings);
  }

  // Successive upgrades follows here.
}