You are here

public function WordPressBlog::migrations in WordPress Migrate 7

Same name and namespace in other branches
  1. 7.2 wordpress.inc \WordPressBlog::migrations()

File

./wordpress.inc, line 166
Implementation of migration from WordPress into Drupal

Class

WordPressBlog

Code

public function migrations() {
  if (empty($this->migrations)) {
    $this->migrations = array();
    foreach ($this
      ->migrationClasses() as $class) {

      // Skip tags/categories if there's no destination vocabulary
      if ($class == 'WordPressTag' && !variable_get('wordpress_migrate_tag_vocabulary', '') || $class == 'WordPressCategory' && !variable_get('wordpress_migrate_category_vocabulary', '')) {
        continue;
      }
      $this->migrations[] = MigrationBase::getInstance($this
        ->machineName($class), $class, array(
        'filename' => $this->filename,
      ));
    }
  }
  return $this->migrations;
}