Skip to main content

benecaster_migration_backup_plugins

Filter Premium migration-wizard

Filters the whole-site backup plugins the Migration Wizard names on its first step. The wizard’s own backup covers Benecaster’s data only — the Benecaster tables plus the Benecaster rows and meta in wp_users and wp_usermeta, which is exactly what the import writes. When it detects a whole-site backup plugin, the step names it and suggests a full site backup as well, so nobody reads “backed up” as “my whole site is covered”.

Out of the box it detects UpdraftPlus and BackupBuddy, by a class or constant each defines. Detection runs on admin_enqueue_scripts, when every active plugin has loaded, so check for your plugin the same way rather than reading active_plugins.

Add whole-site backup tools only. Naming another partial backup here reinforces the very assumption the prompt exists to correct.

name is shown as written, inside a translated sentence. It is the plugin’s own name, so pass it untranslated — a translated name stops the podcaster recognising it in their own menu. settingsUrl may be null; the wizard then names the plugin without linking to it, which is better than a link to the wrong screen. Returning [] removes the prompt entirely.

Parameters

Name Type Default Description
$plugins array — List of detected plugins, each `[ 'slug' => string, 'name' => string, 'settingsUrl' => string|null ]`.

Returns: array

Example

add_filter( 'benecaster_migration_backup_plugins', function ( array $plugins ): array {
    if ( class_exists( 'My_Backup_Plugin' ) ) {
        $plugins[] = [
            'slug'        => 'my-backup-plugin',
            'name'        => 'My Backup Plugin',
            'settingsUrl' => admin_url( 'admin.php?page=my-backup-plugin' ),
        ];
    }
    return $plugins;
} );

Need this built rather than just documented? See our services →