You are here

protected function WordPressMigrateWizard::getVocabulary in WordPress Migrate 7.2

Get the (first, if multiple) vocabulary assigned to the named field.

Parameters

$field_name:

Return value

string|null

1 call to WordPressMigrateWizard::getVocabulary()
WordPressMigrateWizard::reviewForm in ./wordpress_migrate.migrate.inc
Show the user what they've chosen to migrate, and give them one last chance to say yay or nay.

File

./wordpress_migrate.migrate.inc, line 811

Class

WordPressMigrateWizard

Code

protected function getVocabulary($field_name) {
  $field_info = field_info_field($field_name);
  if ($field_info['type'] == 'taxonomy_term_reference') {
    return $field_info['settings']['allowed_values'][0]['vocabulary'];
  }
  return NULL;
}