| Line | |
|---|
| 1 | # WXRImporter plugin for Movable Type |
|---|
| 2 | # Author: Six Apart (http://www.sixapart.com) |
|---|
| 3 | # Released under the Artistic License |
|---|
| 4 | # |
|---|
| 5 | # $Id$ |
|---|
| 6 | |
|---|
| 7 | package MT::Plugin::WXRImporter; |
|---|
| 8 | |
|---|
| 9 | use strict; |
|---|
| 10 | use base qw( MT::Plugin ); |
|---|
| 11 | |
|---|
| 12 | my $plugin = new MT::Plugin::WXRImporter({ |
|---|
| 13 | name => "WXR Importer", |
|---|
| 14 | version => '1.0', |
|---|
| 15 | description => '<MT_TRANS phrase="Import WordPress exported RSS into MT.">', |
|---|
| 16 | author_name => "Six Apart, Ltd.", |
|---|
| 17 | author_link => "http://www.sixapart.com/", |
|---|
| 18 | l10n_class => 'WXRImporter::L10N', |
|---|
| 19 | }); |
|---|
| 20 | MT->add_plugin($plugin); |
|---|
| 21 | |
|---|
| 22 | sub init_registry { |
|---|
| 23 | my $plugin = shift; |
|---|
| 24 | $plugin->registry({ |
|---|
| 25 | 'import_formats' => { |
|---|
| 26 | 'import_wxr' => { |
|---|
| 27 | label => 'WordPress eXtended RSS (WXR)', |
|---|
| 28 | type => 'WXRImporter::Import', |
|---|
| 29 | handler => 'WXRImporter::Import::import_contents', |
|---|
| 30 | options => [ 'wp_path', 'mt_site_path', 'mt_extra_path' ], |
|---|
| 31 | options_template => 'options.tmpl', |
|---|
| 32 | options_param => 'WXRImporter::Import::get_param', |
|---|
| 33 | }, |
|---|
| 34 | }, |
|---|
| 35 | }); |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | 1; |
|---|