Closed (fixed)
Project:
WordPress Migrate
Version:
7.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2012 at 22:38 UTC
Updated:
21 Jan 2016 at 23:16 UTC
Jump to comment: Most recent
Comments
Comment #1
xurizaemonExpanding with more concrete example -
We have WP Posts with site-specific custom metadata, eg "report_abundance", "report_latitude", "report_foliage" (these posts are pest sightings). There are also "regular" posts. For those posts with custom metadata X, we want to (1) alter the imported Drupal node type from "article" to "sighting", and (2) assign the custom metadata to matching fields in Drupal.
Comment #2
mikeryanYes, I should document the technique fully at http://drupal.org/node/1593478. Quick overview:
1. Extend whatever WordPressFoo migration classes you need to modify.
2. Extend the WordPressBlog class, and override migrationClasses() to point to your custom classes:
3. Set the wordpress_migrate_blog_class variable to point to your WordPressBlog extension, E.g., in your settings.php
I'll include a full scrubbed version of this from my last WordPress project in the documentation when I have a chance.
Comment #3
mikeryanIt could use a concrete example, but there's enough there now for a competent programmer to make use of it.
Comment #5
karlsheaThis doesn't seem to be working anymore in the current dev version.
migrationClasses() only gets called from migrations() (and machineName(), but that's only called in migrations()), but migrations() only gets called from drush_wordpress_migrate_import().
Comment #6
mikeryanRestoring the issue status - a bug in functionality is an entirely different issue from the documentation of that functionality.
Comment #7
michelle@mikeryan - Just wondering if you've had a chance to make an example in the 2 years since comment #3? :) I'm feeling a bit overwhelmed and examples are always lovely.