Unregister migrate destination field handler programmatically

Public

Put function in your module. Call it like this YOUR_MODULE_NAME_unregister_handler('MigrateLinkFieldHandler'), where MigrateLinkFieldHandler is the fields' migration handler class name.

Get raw version
php
  1. /**
  2.  * Unregister Destination Handler.
  3.  */
  4. function YOUR_MODULE_NAME_unregister_handler($handler_class_name) {
  5. $handlers = unserialize(variable_get('migrate_disabled_handlers', ''));
  6. if (!in_array($handler_class_name, $handlers)) {
  7. $handlers[] = $handler_class_name;
  8. }
  9. variable_set('migrate_disabled_handlers', serialize($handlers));
  10. }