| @@ -30,8 +30,17 @@ | ||
| 30 | 30 | \Buttonizer\Admin\Admin::class, |
| 31 | 31 | \Buttonizer\Api\Api::class |
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | + // Serve an absorbed plugin's own system, for sites that still run it. | |
| 35 | + // Before the hooks below, because the module registers its own. | |
| 36 | + \Buttonizer\Migration\ModuleLoader::boot(); | |
| 37 | + | |
| 38 | + // Absorb acquired plugins (admin only). Deliberately outside the legacy | |
| 39 | + // branch: a Buttonizer install that still runs its own legacy system is | |
| 40 | + // not in a position to take over another plugin's users. | |
| 41 | + \Buttonizer\Migration\MigrationManager::boot(); | |
| 42 | + | |
| 34 | 43 | // Google Analytics (legacy 2.x setting, buttonizer-specific) |
| 35 | 44 | add_action('wp_enqueue_scripts', function () { |
| 36 | 45 | if (Settings::isset("google_analytics")) { |
| 37 | 46 | wp_register_script('google_analytics', 'https://www.googletagmanager.com/gtag/js?id=' . Settings::getSetting("google_analytics"), array(), false, true); |