You are here

protected function WordPressItemMigration::replaceHTMLEmbeds in WordPress Migrate 7.2

1 call to WordPressItemMigration::replaceHTMLEmbeds()
WordPressItemMigration::prepareRow in ./wordpress_item.inc
Data manipulations to be performed before the migrate module applies mappings.

File

./wordpress_item.inc, line 706
Support for migrating posts and pages from a WordPress blog into Drupal.

Class

WordPressItemMigration
Intermediate Migration class, implementing behavior common across different types (post_type) of items.

Code

protected function replaceHTMLEmbeds($row, $text) {
  for ($i = 1; $i <= 9; $i++) {
    $field = "HTML{$i}";
    if (isset($row->{$field})) {
      $text = str_replace("[{$field}]", $row->{$field}, $text);
    }
  }
  return $text;
}