You are here

function views_plugin_argument_default_taxonomy_tid::convert_options in Views (for Drupal 7) 6.3

Convert options from the older style.

In Views 3, the method of storing default argument options has changed and each plugin now gets its own silo. This method can be used to move arguments from the old style to the new style. See views_plugin_argument_default_fixed for a good example of this method.

Overrides views_plugin_argument_default::convert_options

File

modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc, line 19
Taxonomy tid default argument.

Class

views_plugin_argument_default_taxonomy_tid
@file Taxonomy tid default argument.

Code

function convert_options(&$options) {
  $names = array_keys($this
    ->option_definition());
  $old_prefix = 'default_taxonomy_tid';
  foreach ($names as $name) {
    if (!isset($options[$name]) && isset($this->argument->options[$old_prefix . '_' . $name])) {
      $options[$name] = $this->argument->options[$old_prefix . '_' . $name];
    }
  }
}