/** * Updates attachment URLs according to the given arguments * * @param string $source_url Source site uploads url. * @param string $destination_url Destination site uploads url. * * @return void */ private function update_attachment_urls($source_url, $destination_url) { $tables = [$this->db->comments => ['comment_content'], $this->db->posts => ['guid', 'post_content', 'post_content_filtered', 'post_excerpt'], $this->db->term_taxonomy => ['description']]; array_walk($tables, function (array $columns, $table) use(&$upated, $source_url, $destination_url) { $this->table_string_replacer->replace_string($table, $columns, $source_url, $destination_url); }); }