-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnewspack-custom-content-migrator.php
96 lines (88 loc) · 3.83 KB
/
newspack-custom-content-migrator.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
/**
* Plugin Name: Newspack Custom Content Migrator
* Description: A set of tools in CLI environment to assist during a Newspack site content migration.
* Plugin URI: https://newspack.com
* Author: Automattic
* Author URI: https://newspack.com
* Version: 1.8.2
*
* @package Newspack_Custom_Content_Migrator
*/
namespace NewspackCustomContentMigrator;
use Newspack\MigrationTools\NMT;
// Don't do anything outside WP CLI.
if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
return;
}
require __DIR__ . '/vendor/autoload.php';
NMT::setup();
$error_reporting_level = false !== defined( 'NEWSPACK_CUSTOM_CONTENT_MIGRATOR_ERROR_REPORTING_LEVEL' ) ? NEWSPACK_CUSTOM_CONTENT_MIGRATOR_ERROR_REPORTING_LEVEL : 'dev';
PluginSetup::configure_error_reporting( $error_reporting_level );
PluginSetup::register_ticker();
PluginSetup::add_hooks();
PluginSetup::register_command_classes(
[
Command\General\ReaderRevenueMigrator::class,
Command\General\ListingsMigrator::class,
Command\General\InlineFeaturedImageMigrator::class,
Command\General\SubtitleMigrator::class,
Command\General\CoAuthorPlusMigrator::class,
Command\General\CoAuthorPlusDataFixingMigrator::class,
Command\General\CPTMigrator::class,
Command\General\AdsMigrator::class,
Command\General\NewslettersMigrator::class,
Command\General\TaxonomyMigrator::class,
Command\General\ReusableBlocksMigrator::class,
Command\General\SportsPressMigrator::class,
Command\General\FeaturedImagesMigrator::class,
Command\General\FixMissingMedia::class,
Command\General\ContentDiffMigrator::class,
Command\General\WooCommOrdersAndSubscriptionsMigrator::class,
Command\General\NextgenGalleryMigrator::class,
Command\General\TablePressMigrator::class,
Command\General\NinjaTablesMigrator::class,
Command\General\PhotoAlbumProGalleryMigrator::class,
Command\General\S3UploadsMigrator::class,
Command\General\AttachmentsMigrator::class,
Command\General\PDFEmbedderMigrator::class,
Command\General\ContentFixerMigrator::class,
Command\General\XMLMigrator::class,
Command\General\PrelaunchSiteQAMigrator::class,
Command\General\VillageMediaCMSMigrator::class,
Command\General\MetroMigrator::class,
Command\General\ProfilePressMigrator::class,
Command\General\RasMigrator::class,
Command\General\TownNewsMigrator::class,
Command\General\UsersMigrator::class,
Command\General\EmbarcaderoMigrator::class,
Command\General\ChorusCmsMigrator::class,
Command\General\LedeMigrator::class,
Command\General\DownloadMissingImages::class,
Command\General\MigrationHelper::class,
Command\General\PaidMembershipsPro2WooCommMigrator::class,
Command\General\MolonguiAutorship::class,
Command\General\MediumMigrator::class,
Command\General\CreativeCircleMigrator::class,
Command\General\PostDateMigrator::class,
Command\General\MediaCreditPluginMigrator::class,
Command\General\SimplyGuestAuthorNameMigrator::class,
Command\General\TagDivThemesPluginsMigrator::class,
Command\General\GhostCMSMigrator::class,
Command\General\Multibranded::class,
// Publisher specific commands. Remove from below when launched.
Command\PublisherSpecific\JEPBailiwickMigrator::class,
Command\PublisherSpecific\ArkansasTimesMigrator::class,
Command\PublisherSpecific\MiradorProvincialMigrator::class,
Command\PublisherSpecific\SouthwestRegionalPublishingMigrator::class,
Command\PublisherSpecific\UgObserver::class,
Command\PublisherSpecific\RoughDraftAtlantaMigrator::class,
Command\PublisherSpecific\SanDiegoVoiceAndViewpointMigrator::class,
]
);
PluginSetup::register_migrators(
[
// If you need support for classes that are in the ./publisher-specific-archive/ directory, you can try adding them here temporarily.
// Ideally the class you put there should be refactored to implement the RegisterCommandInterface, and then you can include it (temporarily) in the array above.
]
);