You are here

public function WordPressComment::prepareRow in WordPress Migrate 7

Same name and namespace in other branches
  1. 7.2 wordpress_comment.inc \WordPressComment::prepareRow()

Default implementation of prepareRow(). This method is called from the source plugin upon first pulling the raw data from the source.

Parameters

$row: Object containing raw source data.

Return value

bool TRUE to process this row, FALSE to have the source skip it.

Overrides Migration::prepareRow

File

./wordpress_comment.inc, line 135
Support for migrating comments from a WordPress blog into Drupal.

Class

WordPressComment
Implementation of WordPressMigration, for comments

Code

public function prepareRow($row) {

  // Reject spam
  if ($row->comment_approved == 'spam') {
    return FALSE;
  }

  // Ignore pingbacks
  if ($row->comment_type == 'pingback') {
    return FALSE;
  }
  $row->comment_date = strtotime($row->comment_date);
  return TRUE;
}