You are here

protected function WordPressMigrateWizard::contentSelectFormValidate in WordPress Migrate 7.2

File

./wordpress_migrate.migrate.inc, line 396

Class

WordPressMigrateWizard

Code

protected function contentSelectFormValidate(&$form_state) {

  // Start clean in case we came here via Previous.
  unset($this->contentValues['blog']);
  unset($this->contentValues['page']);
  $this
    ->removeStep(t('Blog posts'));
  $this
    ->removeStep(t('Pages'));
  $this->contentValues['page']['page_type'] = $form_state['values']['page_type'];
  if ($this->contentValues['page']['page_type']) {
    $this
      ->addStep(t('Pages'), 'contentPageForm', $this->currentStep);
  }
  $this->contentValues['blog']['post_type'] = $form_state['values']['blog_post_type'];
  if ($this->contentValues['blog']['post_type']) {
    $this
      ->addStep(t('Blog posts'), 'contentBlogPostForm', $this->currentStep);
  }
}