Redirect to a Plugin Settings Page After Multisite Site Creation?

I am using a geo-tag map plugin called Geo Mashup, along with a WordPress Multisite install.

When I create a new site, an alert appears (in the admin alerts area) immediately telling me I have to go to the settings page to update the database:

Read More

“Geo Mashup needs to upgrade its database, visit the settings to do it now.”

And simply visiting this page (Settings > Geo Mashup) on the new ‘sub site’ makes it work.

Is it possible to redirect the browser to the new site plugin’s setting page right after creating the new site?

Related posts

Leave a Reply

1 comment

  1. The following code does the redirect. In this example, the redirection is to a BackupBuddy’s page.

    add_filter('admin_head-site-new.php','wpse_35760_redirect_after_site_creation');
    
    function wpse_35760_redirect_after_site_creation()
    {
        if( !isset($_GET['update']) || 'added' != $_GET['update'] )
            return;
    
        switch_to_blog($_GET['id']);
        wp_redirect( admin_url( 'admin.php?page=pb_backupbuddy_multisite_export' ) ); 
        exit;
    }
    

    For reference: Related Answer that uses an Action Hook fired on blog creation.
    But, for the case in this Question -redirect after creation-, I think the approach used here may be better.