You are here

protected function WordPressMigrateWizard::vocabularies in WordPress Migrate 7.2

Return a list of vocabularies attached to a given node type (bundle).

Parameters

$node_type:

Return value

array

1 call to WordPressMigrateWizard::vocabularies()
WordPressMigrateWizard::contentForm in ./wordpress_migrate.migrate.inc
Form for mapping source content (node) types to destination types.

File

./wordpress_migrate.migrate.inc, line 792

Class

WordPressMigrateWizard

Code

protected function vocabularies($node_type) {
  $fields = field_info_instances('node', $node_type);
  $term_fields = array();
  foreach ($fields as $field_name => $instance_info) {
    $field_info = field_info_field($field_name);
    if ($field_info['type'] == 'taxonomy_term_reference') {
      $term_fields[$field_name] = $instance_info['label'];
    }
  }
  return $term_fields;
}